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. Hi everyone, We have a Cubecart shop where we have defined an email template for (among others): - Order confirmation - Order dispatched - Order cancelled (See below screenshot taken from Dashboard / Documents / Email templates) I wonder whether it is possible to define different templates which would be triggered based on email status. What I am typically after is defining an email template which would be specificto pending orders (where we want to give customers instructions to pay offline, either by cheque or by bank transfer). When I see the templates in the below screenshot, the names are quite intuitive. However, I'm not sure whether (and how) I can define the logic assigning one event (e.g. order status changed to pending) to one template? Appreciate any help anyone might have here.
  13. Hi, Thanks for your feedback. At line 2041, I can see a check on countries to see if the gateway is available in a given country (I'm enclosing the file cubecart.class.php which I have): cubecart.class.zip Before trying to play with hooks and snippets, I tried customizing myself the function _displayGateways (starting at line 1913), which I appreciate is semi-deprecated, but I didn't see any better position to try inserting this piece of code. Attempt 1, I've added two characteristics of the module "instalments_min_amount" and "instalments_max_amount" (appreciate I could have made the naming more genric...) and added, after line 2041 the two following conditions. But it proved useless, it seems to be ignored (min amount is 100, and a basket which total value was 20 was displayed the payment method) Attempt 2 was somewhat more radical, where I inserted a false condition (see below) after line 2041. Again it didn't change anything and all gateways are displayed My takeaway from this is that, for one reason or the other, the _displayGateways function either is not called, or does not work as expected. As such I'm not sure if it's relevant to try to use the hooks which are within the function? Happy to try, but being unfamiliar with hooks and snippets, I just want to make sure first, that the function is called indeed. Again, thanks so much for your help. Best regards, Guillaume
  14. Having had a further look at this, would it make sense: either having a hook to enable each module making basket conditions, near line 2041 of cubecart.class.php (where we have other basket conditions)? or including some basic basket conditions (e.g. on amount) triggering the display/hide of the gateway? or both?
  15. 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.
  16. 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
  17. 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
  18. 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
  19. 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
  20. Thanks that was very helpful! The error log showed several similar notices and warning (benign, as you said) and one exception regarding a call which is made to Parcel2Go. Deactivating the Parcel2Go module, everything now works normally. I am copying the Parcel2Go error below. It might be that everything failed because we backed up recently and there were no setting filled in in that module, although it was activated. Thanks a lot again! [<strong>Exception</strong>] /home/clients/730d21bd55854ec4d0c02aa159bd4077/sites/www.temp-alerte.com/modules/shipping/Parcel2Go/shipping.class.php:25 - SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://v3.api.parcel2go.com/ParcelService.asmx?WSDL' : failed to load external entity "https://v3.api.parcel2go.com/ParcelService.asmx?WSDL" https://www.temp-alerte.com/index.php?_a=confirm
  21. Thanks for the prompt answer. Here we go: The only update I have made to the SMARTY template is in admin/index.inc.php, I have the following: $GLOBALS['smarty']->assign('STORE_URL', CC_STORE_URL); I am not sure where the System Error Log is displayed? Is that in the admin panel? I didn't find the error log you are referring to Regarding the PHP error log, I followed the procedure you mentioned on the forum linked you posted. And I got the enclosed error log. What really puzzles me is that the error seems to be referring to functions and variables which are core Cubecart and which (to my knowledge) I have not touched Any thoughts? error_log
  22. Hi, I know I should probably give more details, but I don't know exactly where to start the investigation. For a reason which I ignore, I am getting a blank page on index.php?_a=checkout (when trying to proceed with the cart recap right before payment page) and on index.php?_a=confirm (when trying to add an item to the basket). I believe it's solely a php issue (nothing coming from the back-end), as I can still proceed with payment by anually changing the URL to index.php?_a=gateway. After payment I am redirected to index.php?_a=complete and can see the order summary - no problem. I tried doing a back-up of my Cubecart folder to a date where things worked ok, but it didn't help. Maybe I did it wrong though... I usually get this blank page whenever my code has a syntax error. I'd like to be able to check the file which drives these index.php pages. The file index.php looks absolutely ok and hasn't been touched for a while. Any hint as of where I could start investigating from would be very welcome! Guillaume
  23. Sorry, I should have tried this before asking. What you describes worked perfectly indeed!
  24. Cheers, I used the following in admin/index.inc.php: $GLOBALS['smarty']->assign('STORE_URL', CC_STORE_URL); And was eventually able to re-use it in skin/admin/index.tpl. For a reason I did not understand, I was not able to assign other variables. But I didn't investigate that much, as I have enough with $STORE_URL and $VAL_SELF
  25. Hi, On the payment gateway I am developping, I am trying to define cool default values for the admin, so that they need to configurate only the very minimum. In particular, for the return URL, I'd like to set a default value equal to $GLOBALS['storeURL'] . '/modules/gateway/MyGateway/return.php' But how can I access such a global variable from index.tpl? I have seen a couple of global variables being called in index.tpl, e.g. $VAL_SELF, $SESSION_TOKEN, etc. but the naming did not seem to match what is used in php. Appreciate any help! Best regards, Guillaume
×
×
  • Create New...