openfoodfoundation / openfoodnetwork

Connect suppliers, distributors and consumers to trade local produce.
https://www.openfoodnetwork.org
GNU Affero General Public License v3.0
1.1k stars 714 forks source link

Stripe checkout fails due to missing card record #9001

Open mkllnk opened 2 years ago

mkllnk commented 2 years ago

Error in OpenFoodNetwork Aus

NoMethodError in checkout#update undefined method `gateway_payment_profile_id' for nil:NilClass

View on Bugsnag

Stacktrace

lib/stripe/credit_card_clone_finder.rb:34 - fingerprint_for_card
lib/stripe/credit_card_clone_finder.rb:11 - find_cloned_card
lib/stripe/credit_card_cloner.rb:28 - find_or_clone
app/models/spree/gateway/stripe_sca.rb:147 - options_for_authorize
app/models/spree/gateway/stripe_sca.rb:81 - authorize
app/models/spree/payment/processing.rb:218 - public_send
app/models/spree/payment/processing.rb:218 - block in gateway_action
app/models/spree/payment/processing.rb:256 - protect_from_connection_error
app/models/spree/payment/processing.rb:215 - gateway_action
app/models/spree/payment/processing.rb:25 - authorize!
engines/order_management/app/services/order_management/order/stripe_sca_payment_authorize.rb:23 - call!
app/services/checkout/stripe_redirect.rb:17 - path
app/models/spree/gateway/stripe_sca.rb:28 - external_payment_url
app/controllers/checkout_controller.rb:121 - redirect_to_payment_gateway
app/controllers/checkout_controller.rb:100 - checkout_workflow
app/controllers/checkout_controller.rb:38 - update
app/services/current_order_locker.rb:26 - block in lock_order_and_variants
app/services/current_order_locker.rb:24 - lock_order_and_variants
app/services/current_order_locker.rb:13 - around
lib/session_cookie_upgrader.rb:19 - call

View full stacktrace

Created by Maikel via Bugsnag

RachL commented 2 years ago

@mkllnk why is this s3 in dev ready? Do we need to bump the severity?

mkllnk commented 2 years ago

Only one customer has been affected so far and that's why I haven't given it the S2. But it is checkout-related and I don't know the circumstances or potential workarounds.

I'm not sure about the priority. I just thought it would be good to look into it soon.