1

I want to implement Authorize.net (AIM) to take credit cards on site and PayPal Express to give a customer the option to pay off site.

Preferably there would be a column to pay by credit card and column that asks if the user would like to Use PayPal Express.

Would I need 2 forms to do so? Can I have two Checkout forms on one page?

What would the basic code setup look like for this?

1

You should not have issues having two separate checkout forms on the same page but personally I would only use a single form and then use some JS to show/hide fields for each particular gateway based upon with a select field or similar. This would be based off the payment method tag

I am on my phone currently so a code example is a bit hard to do properly but if I remember correctly the store example templates in checkout2 has the ability for multiple gateways so you can see the required code.

| improve this answer | |
  • Where would I get the store example templates in checkout2? The out the box templates that are added when the Store is added? Or somewhere else? – Steve Hampton Sep 23 '15 at 19:50
  • They are added when you install store. – Justin Long Sep 23 '15 at 19:53
  • I reviewed the original template in checkout3 (which is where the billing is located) and we have it setup in the same configuration as the base template. I don't see any setup, other than the basic dropdown which allows the user to select either credit card or PayPal. Once PayPal is selected, nothing happens and the Credit Card form is still active. Would implementing the JS show/hide fields still be the best solution, or is there a scenario where the Credit Card fields can visible in one column and a PayPal button visible in another column? – Steve Hampton Sep 23 '15 at 21:52
  • You would need to either hide the additional fields with JS. Personally I would prefer a single submit button for both CC and PayPal but you could do it in 2 columns. You will just need to make sure that you submit that you specify the payment method for each checkout tag. – Justin Long Sep 23 '15 at 22:15
  • I went with the single button option and we're hiding the CC like you suggested. Thanks for the help. – Steve Hampton Sep 24 '15 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.