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. I forgot to mention - in both cases, no trace of the log that the process() method is called
  4. Thanks for the tip. One of the issues I came across is that, if I pass any ampersand (&) in the query, the signature calculation fails. I have tried twicky it with url encoding and this sort of things, it still fails. I think this one is a problem of Systempay, and led me to replace ampersand (&) by "%26". I am hoping that is not the source of the issue, but if it is, I think it's worth mentioning. Now I've tried what you suggested and actually glanced the error logs: When the response is GET (I can choose whether I want the payment provider to call me back with GET or POST - I just need either of those to work): The PHP console shows this (similar to what I already posted, with spaces in the answer...) - note that I get the ampersands back My Cubecart error log is however showing that no callback method exists (and doesn't have the ampersands but as it looks for a callback method I it interpreted the "%26" as an ampersand) When the response is POST: The PHP console looks clean - although in the Request Headers I have a "Sec-Fetch-Site: Cross-Site" and a warning that "Cookie “CC_CCDBEB6BDA” will be soon treated as cross-site cookie against “https://gu.temperature-alerte.com/index.php?_g=rm%26type=gateway%26cmd=process%26module=Ameo” because the scheme does not match." Now Cubecart's error logs worries me in here, with the invalid security token, and _GET and _POST variables being undefined. Note sure exactly what _POST does, but _GET is used quite a lot and I don't think I can reach very far without it: Today, 22:54 [<strong>Warning</strong>] /home/clients/e6a04653bac4bcb415e27acd100e47e3/sites/gu.temperature-alerte.com/classes/sanitize.class.php:155 - Invalid Security Token https://gu.temperature-alerte.com/index.php?_g=rm%26type=gateway%26cmd=process%26module=Ameo Today, 22:54 [<strong>Notice</strong>] /home/clients/e6a04653bac4bcb415e27acd100e47e3/sites/gu.temperature-alerte.com/includes/functions.inc.php:208 - Undefined variable: _GET https://gu.temperature-alerte.com/index.php?_g=rm%26type=gateway%26cmd=process%26module=Ameo Today, 22:54 [<strong>Notice</strong>] /home/clients/e6a04653bac4bcb415e27acd100e47e3/sites/gu.temperature-alerte.com/classes/debug.class.php:277 - Undefined variable: _POST https://gu.temperature-alerte.com/index.php?_g=rm%26type=gateway%26cmd=process%26module=Ameo
  5. About the GET mode (cf my message on 12 April): the payment providers told me their request is ok - but I've still asked them to check their logs aren't really clear - would there be any way in Cubecart I can find out whether the process() method was called? I'm sure there is nothing wrong with the process() method as it's called if I set it up in the IPN.
  6. Not sure what doesn't look like a POST payload in it. Isn't Cubecart soft supposed to call the process() method when receiving this?
  7. Understood the issue. Afraid I can't fully fix it: This is the query which comes back from the payment provider - I've retried encoding all spaces as plus, to start with, but I'm only computing some of the fields in the query my soft is building. For example I compute vads_cust_first_name and vads_cust_last_name but the payment provider then builds up a vads_cust_name which is a concatenation of these two... separated by a space... Let alone fields they build entirely on their own, e.g. vads_bank_label I will bring that to them and see if they can do something about it Until I get an answer from them, I have tried an alternative: they offer to have the return query as GET (as I tried above) or POST. So I tried POST. This time: I actually land to http://gu.temperature-alerte.com/index.php?_g=rm%26type=gateway%26cmd=process%26module=Ameo (ampersands being replaced by %26) Console logs show: I don't have any space in the request (see below), but there might be other problems, e.g. I still get no log from the process() method and I get a cross-site forgery alert when landing back on the shop
  8. I actually already had the following in my process() method: But it sticked to redirect to index.php solely. I tried changing it to what you suggested, but it keeps redirecting to index.php. The order id is passed below in the get, but there is nothing logged as a transaction, precisely because I've got instructions in the process() method to log it (which is how I found out that the process() method is not called - while it is called when I ask the payment provider to send asynchronous call to gu.temperature-alerte.com/index.php?_g=rm&typegateway&cmd=process&module=Ameo I'm really lost here, but I was under the impression that, the simple fact that I pass the parameters (_g=rm&type=gateway&cmd=process&module=Ameo) in the get method called synchronously in return from the payment provider was enough for the process() method to be called.
  9. Hi, I have a shop which URL is gu.temperature-alerte.com and have developped a payment gateway called Ameo. I've set: the IPN URL (for asynchronous calls) to gu.temperature-alerte.com/index.php?_g=rm&typegateway&cmd=call&module=Ameo - that works brilliantly and I can see the call function is called the return URL (for synchronous calls) to gu.temperature-alerte.com/index.php?_g=rm&typegateway&cmd=process&module=Ameo - that does not work and immediately redirects me to gu.temperature-alerte.com/index.php without calling the process function (see the PHP console from Firefox in the picture enclosed below) only for testing purposes, I had tried to set up the IPN URL to gu.temperature-alerte.com/index.php?_g=rm&typegateway&cmd=process&module=Ameo (I appreciate it's not what I'm supposed to do - I just wanted to see if anything was wrong in the URL or in my function) - and the process function was called Does anyone see anything obvious which I would be doing wrong here? Thanks in advance! Guillaume
  10. 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
  11. 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
  12. 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.
  13. 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
  14. 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
  15. 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
  16. 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...