Skip to content

Commit

Permalink
Merge pull request #4115 from glo71317/Bug#pwa-3029
Browse files Browse the repository at this point in the history
Bug#pwa 3029::[bug]: Selecting payment method causing graphql error
  • Loading branch information
glo82145 authored May 16, 2023
2 parents 8c07d6b + 382a0a2 commit 4c8ed87
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,23 @@ export const usePaymentMethods = props => {
element => {
const value = element.target.value;

const paymentMethodData =
value == 'braintree'
? {
code: value,
braintree: {
payment_method_nonce: value,
is_active_payment_token_enabler: false
}
}
: {
code: value
};

setPaymentMethod({
variables: {
cartId,
paymentMethod: {
code: value,
braintree: {
payment_method_nonce: value,
is_active_payment_token_enabler: false
}
}
paymentMethod: paymentMethodData
}
});
},
Expand Down

0 comments on commit 4c8ed87

Please # to comment.