Installation of an alternative payment method
Auteur : Jerome B.
Visité 2786,
Followers 1,
Partagé 0
To the programer team :
I am actually installing another solution than paypal and it looks like the solution from the bank that provide me the installation kit is tricky to make it fit with the Xcart solution from WebsiteX5 evolution 9.
The bank (CM-CIC : https://www.cmcicpaiement.fr/fr/index.html) requires php sealed page, and my php programmer is asking if website x5's shopping cart can be combined to this solution, and how does it send (technically) the customers information and the cart's total amount.
The purpose of the last question is to find a way to make it compatible with the bank's website while keeping the use of Xcart. (and not having to build a whole MySql thing.)
Thank you for your answer.
Jérôme Baumann
Posté le
Hello Jérôme,
The e-commerce cart from WebSite X5 doesn't directly support PHP but there's a way to provide support to PHP.
First, remember that the keyword [ORDER_NO] is replaced with the order number and the keyword [AMOUNT] is replaced with the order grand total.
Just do as follows:
This will transmit to your custom php page only the order's grand total and number.
The cart stores the customer's personal data into a cookie and deletes that cookie once the order is completed.
If you want to get the customer's personal informations in your PHP code, you should edit the file "x5cartengine.js" inside your site's "res" folder. Just open it in a text editor and comment out the lines from 1031 to 1035 (this on the latest available version of WSX5 V9.1.2). In this way the cookies will not be deleted and you will be able to access them in your php code.
That's it.
Hope this helps!
Auteur
Thank you for your answer, I've sent it to my programmer.
Does websiteX5 modify the "x5cartengine.js when I update my website or when I update the software ?
Auteur
The question is, "do I have to re-write the command lines every time I change the cart or everytime I update websiteX5 ?
If you edit "x5cartengine.js" directly into WebSite X5's "Res" folder, you won't need to do it anymore. If you edit the one in the site's folder, everytime you update your site you have to rewrite it.
Auteur
Thank you very much for your answers !
Now I think my programmer will be able to handle this.
Can I post it on the public forum to let know those who want to do the same ?
Best Regards,
Jerome
Of course!
I can even turn this post into public if you want.
Thank you!
Auteur
I already have a thread in french about it, but it can help english speakers so please be free to proceed.
Have a nice day !
Auteur
Hello again, I have a few more question from my programmer :
1) is the "custom payement HTML code" (link) the very same snippet sent in the confirmation email AND shown at the end of the cart process?
2) if the answer above is Yes, then even if the cookies wouldn't be deleted with the changes in "x5cartengine.js" the customer MAY click the link a few days after (via email), and depending on his browser's settings, the cookies MAY get deleted anyways when he'd click... It would be better to have a tag [EMAIL] or something like that, does it exists?
3) is it possible to get multiple payments solutions? Example:
<a href="yourcustompage.php?amount=[AMOUNT]&orderno=[ORDER_NO]">Pay now with ABC</a>
<a href="yourcustompage.php?amount=[AMOUNT]&orderno=[ORDER_NO]">Pay now with ZYX</a>
4) is there a way to access some page or webservice instead, submitting only the [ORDER_NO] and getting the stored informations back?
Thank you for your answers !
Yes, it's the same code.
No, unfortunately the [EMAIL] tag doesn't exist yet. You can anyway find the order name. Personally, in this case I would show a form to the user and ask again for his personal data. If the user will click on the link days after placing the order, filling again a form shouldn't bother him.
<a href="yourcustompage.php?amount=[AMOUNT]&orderno=[ORDER_NO]">Pay now with ABC</a>
<a href="yourcustompage.php?amount=[AMOUNT]&orderno=[ORDER_NO]">Pay now with ZYX</a>
Yes. In the custom HTML code, you can place all the HTML you like. You can even use an iframe tag and load inside it your custom PHP page.
Yes. You should use AJAX in the custom HTML code and manage the data transfer via JavaScript.
I also suggest to your programmer to take a look to x5cartengine.js. It's not minified and the code is clean and commented. He can even edit it to match your needs.
Auteur
Great, thanks for your answer, I send it to my programmer and tell you the result.
Auteur
Hello again,
one last point before we can say it is a success.
My programmer just showed me that the tag [AMOUNT] is not replaced by the amount.
When the sale is confirmed, the command number appears with the tag [AMOUNT] like this, instead of the amount(in number).
Here are the example to help the understanding :
http://www.nouvelletablettegraphique.com/cart/cm-cic.php?amount=[AMOUNT]&orderno=120830-VW11
http://www.nouvelletablettegraphique.com/cart/cm-cic.php?amount=[AMOUNT]&orderno=120830-WM55
just enter an email adress and click on the button (this is the last step before communicating to the bank system.)
You're right. My mistake. The correct keyword is [PRICE].
Auteur
Thanks !
Auteur
But please whip yourself just a little bit.
Auteur
This is it !
It is finally installed and working.
Thanks for your help.
Nice to hear that!
Have a good day!