Jump to content

Guillaume

Member
  • Content Count

    25
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. It's indeed specific to my plugin. I don't think the problem comes from the payment processor, I don't master the Cubecart framework, so it's probably a bug in my code, which this work-around solves.
  2. Thanks a million. After several tries, I managed! I am pasting the code which works, for everyone's records: $transaction_records = $GLOBALS['db']->select('CubeCart_transactions', array('id'), array('order_id' => $cart_order_id), false, false, false, false); if (!$transaction_records) $order_log = $order->logTransaction($transData);
  3. Because I can't understand the problem's root cause, I'm trying to make a patch by checking if the existing logs for that order are empty, and only log the transaction if so is the case. But I'm guessing I'm totally wrong in my syntax: I've similarly tried if !empty(...) and a few similar methods, without luck. What I'm struggling to understand is the nature of the object $order->logTransaction($transData) I have also tried capturing the $order->logTransaction($transData) into a variable first, as below, but without luck: Similarly, I have also tried if (empty(.
  4. Thanks a million, I've used the below code and can now get the exchange rate indeed: $currency_records = $GLOBALS['db']->select('CubeCart_currency','value',array('code' => $currencyCode)); if ($currency_records !== false) $exchange_rate = $currency_records[0]['value']; By any chance would you know the equivalent query to retrieve the amount of decimals (which is "2" for nearly all currencies)? I have tried replacing "value" by "decimals_place". Sounded a fair guess from what I saw both in the Cubecart code and in the logs when updating the admin panel (
  5. Hello, I am developping a payment gateway to connect my Cubecart-powered website with French PSP Systempay. Not that I specifically need that myself, but for the sake of public interest, I would like the gateway to support multi-currencies (provided, of course that the website owner has the correct set-up but in Cubecart and in Systempay). Where I am struggling is on how to retrieve the exchange rates, which we have in Cubecart's admin panel. I have tried the following, all of them staying empty: $currency_records = $GLOBALS['db']->select('CubeCart_curren
  6. Hi everyone, I am developping a plugin with the aim to interface my Cubecart-powered website to a French PSP called Systempay. All works good, and I am about to publish. However, for a reason which I ignore, after payment, transactions are systematically logged twice. The problem is specific to my plugin Systempay (as you can see from the transaction logs enclosed, Paypal Commerce and Print Order Form work all right). I believe the problem is somewhere around line 163 of my call function: $order->logTransaction($transData); But what really puzzles me is that,
  7. Thanks for your heads-up. I have tried a few things which did not work, only to later find out that, in my soft the order ID is used as a key for nearly everything (see picture enclosed). The problem is, in that call() function I get the order ID back from the payment gateway message, and hence it must be defined with its own syntax. In the very case of Systempay that means: $cart_order_id = sanitizeVar($_REQUEST['vads_order_id']); And that's what I got wrong all the way. Now everything works, not only I have the transaction in the logs, but the order status is updated, and everythin
  8. Hi, Thanks for the heads-up above, that's good to know. I tried the above and it didn't work, unfortunately. As I was afraid it may be because $_REQUEST['transId'] is empty, I identified seven characteristics of transData present in the "Print Order Form" gateway (which correctly logs transactions made on the website I am developping) and tried hard-coding them. It gives a code like the below: $transData['customer_id'] = "Guillaume"; $transData['gateway'] = "Systempay"; $transData['order_id'] = "1234"; $transDat
  9. Hi, The below worked indeed. Thanks a lot for your help, I've adapted it and added it to my code! $currency_records = $GLOBALS['db']->select('CubeCart_currency','iso',array('code' => "AUD")); if ($currency_records !== false) $currencyISO['AUD'] = $currency_records[0]['iso'];
  10. I've tried the above, but I am afraid my code does not compile. I have a few questions: Why do we need to define a Tax object for that? Isn't it just about calling a Cubecart database with a key (e.g. "EUR") to retrieve a value ("978")? In the above, what exactly disappears after the below instruction? In particular, is the $currencyIso['AUD'] still defined after that? (I have tried putting the unset at the very end of my code, but it still did not compile unset($myTaxObject); Would we have a description somewhere of the database CubeCart_currencies? I believe I haven't
  11. Hi, My admin page unfortunately is in French, but I believe the below is what you are about. I have several payment gateways (Print Order Form, Paypal Commerce, Systempay) offered on the website, and transactions (and orders) made with Systempay are indeed never reported here... Which I believe is an interesting finding. Looking again at the soft, I am under the impression that the instruction on line 179 $order->logTransaction($transData); is therefore probably not executed? However, I checked again changing the redirection address, and am 100% sure that the call() fun
  12. Hi, Thanks a lot for your support. I am absolutely sure the call() method is executed and we get into the if loop checking the payment is authorized. I tested this by changing the URL we redirect to (see the last version of my file, where in the if loop I define the URL to redirect to, while as you suggested earlier, the httpredir command is only executed at the very end). Enclosed are the logs (Cubecart debug mode) appearing below the page, after payment. Was it these logs you were about? The order ID in this occurence is 210403-223854-8239. I did not find anyting meaningful with re
  13. Hi, Really appreciate your help! However, I have tried the following (the full soft is enclosed to this message), and the order and payment statuses still seem to be ignored. I fully agree with your remark on the order status (complete means it has been shipped), but for now I simply wanted to test using a status which is different enough from pending, so that I can clearly identify if my instruction is applied or not (and unfortunately it is not): $redirection = $GLOBALS['storeURL'].'/index.php'; if($_REQUEST['vads_trans_status'] == "AUTHORISED"){
  14. Hello, I am currently working on developping a new gateway to interface with Systempay, and would like to make it support several currencies (provided of course, that the website of the subscriber supports it). As such, the idea would be to rely on Cubecart's currency conversion tables, and convert the amount and change the currency before approaching the gateway (Systempay). I do not want to let Systempay do the currency conversion (because if they do, any mark-up goes to them). However, as for many gateways, it expects the numerical currency code in the request. This led me to define
×
×
  • Create New...