PayPal Payflow Pro Vault payment method
PayPal Payflow Pro Vault payment method processes credit and debit card payments using information stored in the vault. This payment method is available for customers of the United States, Canada, Australia, and New Zealand.
The following conditions must be true to use this payment method:
The shopper must be a logged-in customer.
The customer must have previously saved their payment information in the vault.
You cannot use this payment method if the customer decides to use a credit or debit card that is not stored in the vault.
If the customer's stored payment information becomes outdated, use the deletePaymentToken mutation to remove the token. Then perform the actions described in the PayPal Payflow Pro payment method to generate a new token and process the order.
Use the storeConfig
query and specify the payment_payflowpro_cc_vault_active
attribute to determine whether the Vault feature is enabled for Payflow Pro.
Payflow Pro workflow
The following diagram shows the workflow for placing an order when Payflow Pro Vault is the selected payment method.
Use the
customerPaymentTokens
query to retrieve the payment tokens the customer has stored in the vault.The application returns an array of payment tokens.
The client renders the token information, and the customer selects a payment method.
When the customer selects a stored payment method, the PWA uses the
setPaymentMethodOnCart
mutation to set the payment method topayflowpro_cc_vault
. The vaulted public hash is passed in thepayflowpro_cc_vault
object.The application returns a
Cart
object.The client runs the
placeOrder
mutation.The application sends an authorization request to the gateway.
The gateway sends the response to Magento.
The application creates an order and sends an order ID in response to the
placeOrder
mutation.
Additional Payment information
When you set the payment method to Payflow Pro Vault in the setPaymentMethodOnCart
mutation, the payment_method
object must contain a payflowpro_cc_vault
object, which contains the customer's public hash.
payflowpro_cc_vault attributes
The payflowpro_cc_vault
object must contain the following attribute:
Attribute | Data Type | Description |
---|---|---|
public_hash | String! | The public hash of the payment token |
Example usage
The following example shows the setPaymentMethodOnCart
mutation constructed for the Payflow Pro payment method.
Request:
Copied to your clipboardmutation {setPaymentMethodOnCart(input: {cart_id: "IeTUiU0oCXjm0uRqGCOuhQ2AuQatogjG"payment_method: {code: "payflowpro_cc_vault"payflowpro_cc_vault: {public_hash: "<public-hash-value>"}}}}){cart {selected_payment_method {code}}}
Response:
Copied to your clipboard{"data": {"setPaymentMethodOnCart": {"cart": {"selected_payment_method": {"code": "payflowpro_cc_vault"}}}}}