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

Initialize payment form on Pay for Order screen #292

Merged
merged 1 commit into from
Nov 28, 2019

Conversation

dechov
Copy link
Contributor

@dechov dechov commented Nov 28, 2019

In contexts where the updated_checkout event doesn't fire, the payment form isn't being rendered.

This change adds an explicit condition for mounting the element, adapted from the Stripe extension (and looking ahead to when saved cards are supported, see #14).

Changes proposed in this Pull Request

master this branch

Testing instructions

From an Edit Order admin screen for an order with "Pending payment" status, follow the link to the "Customer payment page →", and attempt to enter a credit card using this payment method.


  • Tested on mobile (or does not apply)

In contexts where the updated_checkout event doesn't fire, the payment element isn't being mounted. Adds an explicit condition for doing so.
@dechov dechov requested a review from a team November 28, 2019 04:17
@jrodger jrodger self-assigned this Nov 28, 2019
@jrodger
Copy link
Contributor

jrodger commented Nov 28, 2019

Looks good, tests well.

I wasn't able to get the payment working though, looks like we'll need to add this processing to the pay for order page as well. The Stripe gateway does this by abstracting out the "form" we're working with a little bit, following the same pattern here seems sensible.

Do we want to get this merged and open another issue? Or handle it here? I'm happy either way.

@dechov
Copy link
Contributor Author

dechov commented Nov 28, 2019

Ah, right – thanks for testing that.

I'm happy either way too – it might not be too complicated and it doesn't help much to make it look like it'll work when it won't, but I opened another issue (#293) so that I'm not a blocker for it.

@dechov dechov merged commit 6db5bb7 into master Nov 28, 2019
@dechov dechov deleted the fix/pay-for-order-mount-element branch November 28, 2019 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants