Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when switching between a payment methods the the redirect url is not always retrieved via ajax #7

Open
jdukeukpos opened this issue Mar 18, 2016 · 0 comments

Comments

@jdukeukpos
Copy link

we have 2 payment methods on our site - sagepage direct and paypal

  • there is no form for paypal and it requires a redirect to a paymentRedirect url
  • there is a form for sagepay and it does a ajax post to the specified save url

Issue 1:
If a user goes to the checkout, selects the paypal payment method and then refreshes the page the checkout displays properly with the paypal payment method selected; however the checkout js object does not the correct paymentRedirect url (it has none at all).

Solution:
pass the paymentRedirect url in the config options for the chekout js object and then have the initialize method set it internally if present

Issue 2:
The payment.switchMethod method sets the paymentRedirect url to false on a switch; however if there is no form (as in the case of paypal) handleChange() only fires completely the first time.

After the first time the LastSubmittedValues match the values the getValues() - an empty hash.

This means that the payment change is not submitted and no paymentReditect url is received via ajax leaving the paymentRedirect url incorrectly as false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant