I am try to implement Paypal Express with PWA, I am refer https://devdocs.magento.com/guides/v2.3/graphql/payment-methods/payflow-express.html link to implement Graphql API. I have completed 1 to 6 steps.
In 7 step i am try to implement setPaymentMethodOnCart
mutation. In 7 step
As per magento link suggestion we need to pass PayPal token, Payer ID and Cart ID in setPaymentMethodOnCart
mutation, but when i pass PayPal token, Payer ID to mutation i got the error Field \"token\" is not defined by type PaymentMethodInput
, In 7 step description magento has mention we need to pass PayPal token, Payer ID in mutation but when i am try to do this i am getting error.
Request :
mutation {
setPaymentMethodOnCart(input: {
cart_id: "xxxxY2GZeLjGKdC4bea6R8dGFvXfxxxx"
payment_method: {
code: "payflow_express"
token: "xxxx"
payerid: "xxxx"
}
}) {
cart {
selected_payment_method {
code
title
}
}
}
}
Anyone have idea how can we pass Token and Payer Id.