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

undefined local variable or method `payment' for #<ActiveMerchant::Billing::StripePaymentIntentsGateway:0x00007fba147d0098> #3341

Open
waaux opened this issue Sep 9, 2019 · 4 comments

Comments

@waaux
Copy link
Contributor

waaux commented Sep 9, 2019

I am getting this message undefined local variable or method `payment' when I am trying to store the customer credit card information using the new Stripe Payment Intents Gateway.

I am doing this:
response = provider.store(creditcard, options)

where creditcard is the credit card information from the user.

@waaux
Copy link
Contributor Author

waaux commented Sep 9, 2019

https://github.com/activemerchant/active_merchant/blob/master/lib/active_merchant/billing/gateways/stripe_payment_intents.rb#L133

In this line should be: super(payment_method, options) instead of super(payment, options) ???

@davideghz
Copy link

hi @waaux yes, it's definitely as you suggest, we fixed it as well like that in our app.

OT: we are also trying to use the new Stripe's Payment Intents Gateway API with Stripe's Element and spree_gateway; how do you handle 3DS redirects? we think to keep the "old" suggested flow with form submission, then implement the required webhooks and handling all redirects for 3DS from the backend, passing the webhook's return_url

@waaux
Copy link
Contributor Author

waaux commented Sep 11, 2019

Hi @davideghz
As you suggested I will use the old flow with flow submission and follow this Stripe tutorial to handle 3DS. Link: https://stripe.com/docs/payments/3d-secure-iframe

How did you fix this problem from your app? Did you use _decorator file???

@davideghz
Copy link

davideghz commented Sep 11, 2019

How did you fix this problem from your app? Did you use _decorator file???

we "vendorized" the gem and fixed it directly, waiting for your PR to be merged :)

we are still having hard time in handling 3ds redirects tho

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

2 participants