Generally the idea is you present the customer with the payment provider options, they choose one, then on the next screen you render the payment providers form which will send them to the relevant gateway.
Right. In our case we're not going to use an additional page to display what they've just chosen. So, given an example of 3 payment options, choosing any of them would send the customer off to the payment gateway. On the final page everything is displayed so there really is no need to show it again.
I'm assuming the RenderPaymentForm will use the PaymentInfo from the order to call the selected provider? If that is the case then I cannot use that method because at this point (in the checkout) the user hasn't selected a payment method.
If there were a RenderPaymentForm method that took a payment method name/sku and rendered for that specific method, that would be handy :)
Ok, then in this case you may need to do some custom logic. There could be a few options.
1) When they select a payment method, have that form submit to this next screen, but submit that into a hidden iframe which then renders the given form and auto submits it back to the main window.
2) On selecting a payment method, make a javascript request to an alt template or similar that can render the given payment methods form and return it's code, then you replace the continue button witch the option.
We can't really allow all buttons to be rendered at once as rendering the button usually involves communicating with the payment gateway and creating a session so you'd end up creating sessions for all the payment gateways whether you needed them or not.
Option 1 would probably work best in this scenario as the payment provider form isn't generated until the continue button is clicked.
I do need give this some though as I'm getting a lot of requests for needing to bypass the review step, but it needs to be done carefully so as not to create too many sessions.
Display multiple payment forms
Hi Matt
I want to show multiple payment forms as we'll have multiple options, e.g. account (invoice), credit card and paypal.
How do I render a form for all of the configured payment providers?
Thanks Sean
Hi Sean,
I'm not quite sure what you mean?
Generally the idea is you present the customer with the payment provider options, they choose one, then on the next screen you render the payment providers form which will send them to the relevant gateway.
/Mat
Right. In our case we're not going to use an additional page to display what they've just chosen. So, given an example of 3 payment options, choosing any of them would send the customer off to the payment gateway. On the final page everything is displayed so there really is no need to show it again.
I'm assuming the RenderPaymentForm will use the PaymentInfo from the order to call the selected provider? If that is the case then I cannot use that method because at this point (in the checkout) the user hasn't selected a payment method.
If there were a RenderPaymentForm method that took a payment method name/sku and rendered for that specific method, that would be handy :)
Ok, then in this case you may need to do some custom logic. There could be a few options.
1) When they select a payment method, have that form submit to this next screen, but submit that into a hidden iframe which then renders the given form and auto submits it back to the main window.
2) On selecting a payment method, make a javascript request to an alt template or similar that can render the given payment methods form and return it's code, then you replace the continue button witch the option.
We can't really allow all buttons to be rendered at once as rendering the button usually involves communicating with the payment gateway and creating a session so you'd end up creating sessions for all the payment gateways whether you needed them or not.
Option 1 would probably work best in this scenario as the payment provider form isn't generated until the continue button is clicked.
I do need give this some though as I'm getting a lot of requests for needing to bypass the review step, but it needs to be done carefully so as not to create too many sessions.
/Matt
Yes, 1 is the path i'm going down now.
is working on a reply...