| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Popup custom payment module is posting and redirecting | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Popup custom payment module is posting and redirecting
Hi,
I am developing a custom payment plugin that is meant to work like Stripe. I have in my payment.js, the below code Code:
This shows the popup fine but I have a challenge with it posting and redirecting. It doesn't make the popup state well enough for the user to perform payment action. Please I need an urgent help on this. Regards.
__________________
5.2.8 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Popup custom payment module is posting and redirecting
Hello,
SimplifyCommerce and PayPal are two other modules that behave like Stripe module and use a similar way to hack into the flow. So, you may check the source code of these modules too. Please can you explain the issue with more details? As far as I see you use a different JS code than Stripe module, so it may be the cause. What is the desired flow, and what in the flow goes wrong at the moment?
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: Popup custom payment module is posting and redirecting
Thanks for your reply qualiteam. I have gone through the source codes and code not really make headway.
Here is the flow... 1. I add the payment plugin js to the checkout page (Working) 2. Build some data on the template (Working, find below sample code) Code:
3. When the payment gateway loads the JS, it displays a button to be clicked in Quote:
4. I hide the element so that when the user clicks the "Place Order" button on checkout, it clicks the button displayed by the payment gateway dynamically. (Worked well) 5. When the payment gateway popup comes up, it doesn't stay...other process happens and the page is being redirected. Quote:
Yes it is not Stripe's code, I strip it down to the barest minimum because it contains code that are not conforming to my payment gateway flow. I suppose the Code:
__________________
5.2.8 |
|||||||
#4
|
|||||||
|
|||||||
Re: Popup custom payment module is posting and redirecting
Please help ^^^^
__________________
5.2.8 |
|||||||
#5
|
|||||||||
|
|||||||||
Re: Popup custom payment module is posting and redirecting
state.state determines whether the order can be placed, or not. If you set it to false the order will never be placed.
Stripe module sets this property to false if the module is enabled, but the token from Stripe is empty. The recommended way to initialize the JS part of your integration is hooking to the checkout.paymentTpl.postprocess event (like Stripe does). Where does the redirect happens to? Does it submit to the payment gateway's server? If so, you should either put that into an IFRAME, or use the standard flow for web-redirect based integrations (without any background checks).
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|