Jump to content

Guillaume

Member
  • Posts

    89
  • Joined

  • Last visited

Everything posted by Guillaume

  1. I actually have the IPN working fine (and my call function is called indeed). So the problem seems to be only limited to the instruction actually emptying the cart offline. I have made several attemps: (which you suggested) I then checked the logs and finding that I was logged under 'customer_id '= 1, tried the following: Also unsuccessful. Then I tried playing with the session, but I believe, as you indicated above, that the session is populated again when coming back to the website, which would explain the below attemp being unsuccessful: Any hint would be much appreciated! Guillaume
  2. Got the answer on this one. IPN is triggered by triggering the call function, and this happens by redirecting to yourstoreurl.com/index.php?_g=rm&type=gateway&cmd=call&module=yourmodulefoldername Where you would of course replace yourstoreurl and yourmodulefoldername by the correct values.
  3. Hi, This topic is a sort of continuation of the below: But although the payment gateway I am implementing is offering an IPN capability (to remotely update Cubecart's database of orders, e.g. in the case the customer closes the window or looses connection before the payment confirmation page is displayed), I never managed to implement it successfully. From what I read in the code, I am understanding that: - the right URL to call is $storeURL . "/index.php?_g=remote" - I am guessing that from what I see in cubecart.class.php from line 258 onwards, but I might be mistaken - if that URL is successfully called, the instructions to decode the IPN shall either be in the function call() or process() of the file gateway.class.php of the payment gateway module - I am guessing that from what I see in cubecart.class.php from line 285 onwards, but again I might be mistaken Am I getting any of the above wrong? If so, appreciate if anyone could comment. Or if anyone could point me to any payment gateway which successfully implemented IPN, that would be very helpful! Best regards, Guillaume
  4. Hi, Apologises for coming back on this topic. I still did not manage to correctly implement the IPN on this payement gateway. The obvious consequence is that, if after clicking pay, the customer closes the window, then the cart is not emptied. There might be something I do wrong in processing the payment system provider's response, but I wonder whether in Cubecart, there is a dedicated URL to be called for offline payment notifications? Or is it the same as online payment notifications, i.e. $STOREURL."index.php?_a=complete" in case of success? Best regards, Guillaume
  5. Sure: A first (Beta) version of the "Pay by Instalments" version was uploaded and published to Cubecart on 3rd June 2021 - under the name Systempay - downloaded 86 times so far A second version of the above was just published yesterday. For IP reasons, I had to rename it "Paiement CB France par Améo - Paiement en plusieurs fois" A similar version for straight payment (not by instalments) was also published yesterday. It is named "Paiement CB France par Améo" In the next version I'd like to male a couple of improvements and solve a couple of bugs, included the one mentioned here. Note that I have been in touch with Lyra (which owes all the payment gateways accessible through this module) to have the module officially referenced on their website. The certification process on their side is ongoing.
  6. Hi, Would really appreciate any insight anyone may have here. Is there any way to clearly rule out, from Cubecart's perspective, whether the cookies are deleted? E.g. can I look for a cookies log in Cubecart? What I am not getting in the first response is "CubeCart does not know what the customer_id is supposed to be". I believe it does, because the customer is still logged, and his cart is still present (besides the order being recorded in his account). I am rather under the impression that when the ?_a=complete is called, for some reason the cart is not emptied, possibly because it is called incorrectly. However, I am not sure how to verify that... Any hint very appreciated. Best regards, Guillaume
  7. Hi, Thanks a lot for your feedback - really appreciate your help. I was trying so far with Firefox, and don't think I have any such add-on. I tried with Chrome (where I have no add-on for sure), same result. I am not really sure what to do next: how are IPN usually managed in the case the user closes the window? I'm afraid I can't really test to that extent on other gateways, as I would need a test key to get the payment through. What really puzzles me is that the IPN seems to be taken into consideratio, as the function call() is used indeed (I can see that as it logs the transaction). But solely when it comes to emptying the cart that fails. Could there be anything wrong with the cart emptying command we've defined? Cheers, Guillaume
  8. Hi, Thanks a lot for this detailed answer. The way I understand it is, that whenever a customer comes back to Cubecart, Cubecart will try to retrieve from the database their basket. This would explain that merely deleting the cart from the session (with the below) does not work, because Cubecart would subsequently retrieve the cart from the DB and put it back in session: $GLOBALS['session']->clear(); $GLOBALS['session']->delete('basket'); Now I've tried the below, which you suggested, but for some reason it does not work: $GLOBALS['db']->delete('CubeCart_saved_cart', array('customer_id' => $order_summary['customer_id'])); $GLOBALS['cart']->clear(); I've checked and the instruction seems corect, as in the logs the customer_id is correctly filled in, both for the cart and the order_summary. What also puzzles me is that I have the below instruction (where redirection is towards the index.php?_a=complete page) in my code: httpredir($redirection, '', true, 200, true); Where you mentioned a cart clearance is conducted. That works perfectly when I don't close the window. But for some reason it deosn't when the window is closed. I guess my next step is to read the database and make sure the instruction in database is correctly executed. Guillaume
  9. Hi, This is a continuation of this topic: So I have developped a payment module, which has a gateway.class.php file with a call() function in it. This time, my call() function is called, I know it as I log transaction notes, and they are exactly reported as instructed in such function. However, on the payment gateway: If I let the payment page go through and come back to the store URL, the order is indeed registered and the cart is emptied If I close the window after the payment is accepted, although the order is registered, the cart is not emptied What puzzles me is that the transaction logs are filled in as instructed in the call() function, and right below this instruction which I know is processed, I have put a: $GLOBALS['cart']->clear(); But in case 2, the cart is never emptied. And to be very honest, even commenting the above instruction e,ptying the cart, in case 1 the cart is emptied nevertheless. Any hint on how I could make sure the cart is emptied? Best regards, Guillaume gateway.class.php
×
×
  • Create New...