Skip to content

Do not set @client_secret and @pk_key if order has no valid payments#405

Open
AlexeyBoldak wants to merge 1 commit into
spree-contrib:mainfrom
AlexeyBoldak:fix/properly-handle-order-payments
Open

Do not set @client_secret and @pk_key if order has no valid payments#405
AlexeyBoldak wants to merge 1 commit into
spree-contrib:mainfrom
AlexeyBoldak:fix/properly-handle-order-payments

Conversation

@AlexeyBoldak

@AlexeyBoldak AlexeyBoldak commented May 29, 2022

Copy link
Copy Markdown

This issue happened with this type of cards

The cards in the previous table can’t be attached to a Customer object. To simulate a declined payment with a successfully attached card, use the next one. 4000000000000341

After successfully attaching the card inside CheckoutControllerDecorator#process_payments_and_set_keys we call order.process_payments!, we mark this card (payment method) as invalid. And this behaviour leads to error NoMethodError, undefined method intent_client_key' for nil:NilClass`

I believe that this fix relates to this issue #379

@AlexeyBoldak AlexeyBoldak force-pushed the fix/properly-handle-order-payments branch from 6fc98ae to 938b504 Compare May 29, 2022 11:34
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

Successfully merging this pull request may close these issues.

2 participants