From b546c181f0568403e992795613167aab7d106643 Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Mon, 7 Dec 2020 17:42:08 +0530 Subject: [PATCH 1/2] Update braintree-vault.md Request data is invalid. Syntax Error: Expected Name, found ". --- .../payment-methods/braintree-vault.md | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/guides/v2.3/graphql/payment-methods/braintree-vault.md b/src/guides/v2.3/graphql/payment-methods/braintree-vault.md index fa5aa37af3e..47a00ec7a1d 100644 --- a/src/guides/v2.3/graphql/payment-methods/braintree-vault.md +++ b/src/guides/v2.3/graphql/payment-methods/braintree-vault.md @@ -20,7 +20,7 @@ The following diagram shows the workflow for placing an order when Braintree Vau 1. 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`]({{page.baseurl}}/graphql/mutations/set-payment-method.html) mutation to set the payment method to `braintree_cc_vault`. The vaulted public hash is passed with other optional properties in the [`braintree_cc_vault`](#braintree_cc_vault-object). + When the customer selects a stored payment method, the PWA uses the [`setPaymentMethodOnCart`]({{page.baseurl}}/graphql/mutations/set-payment-method.html) mutation to set the payment method to [`braintree_cc_vault`](#braintree_cc_vault-object). The vaulted public hash is passed with other optional properties in the [`braintree_cc_vault`](#braintree_cc_vault-object). 1. Magento returns a `Cart` object. @@ -35,7 +35,7 @@ The following diagram shows the workflow for placing an order when Braintree Vau ## `setPaymentMethodOnCart` mutation When you set the payment method to Braintree in the [`setPaymentMethodOnCart`]({{page.baseurl}}/graphql/mutations/set-payment-method.html) -mutation, the `payment_method` object must contain a `braintree_cc_vault` object. +mutation, the `payment_method` object must contain a [`braintree_cc_vault`](#braintree_cc_vault-object) object. ### braintree_cc_vault object @@ -54,18 +54,20 @@ The following example shows the `setPaymentMethodOnCart` mutation constructed fo ```graphql mutation { - setPaymentMethodOnCart(input: { - cart_id: "IeTUiU0oCXjm0uRqGCOuhQ2AuQatogjG" - payment_method: { - code: "braintree_cc_vault" - braintree_cc_vault: { - public_hash: "fake-public-hash" + setPaymentMethodOnCart( + input: { + cart_id: "IeTUiU0oCXjm0uRqGCOuhQ2AuQatogjG" + payment_method: { + code: "braintree_cc_vault" + braintree_cc_vault: { public_hash: "fake-public-hash" } } } - }) { - cart { - selected_payment_method { - code + ) { + cart { + selected_payment_method { + code + title + } } } } @@ -80,6 +82,7 @@ mutation { "cart": { "selected_payment_method": { "code": "braintree_cc_vault" + "title": "Stored Cards" } } } From 0196773f5ccc6775f31135e18db102c165e7078a Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Tue, 8 Dec 2020 10:42:29 +0530 Subject: [PATCH 2/2] Update braintree-vault.md --- src/guides/v2.3/graphql/payment-methods/braintree-vault.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guides/v2.3/graphql/payment-methods/braintree-vault.md b/src/guides/v2.3/graphql/payment-methods/braintree-vault.md index 47a00ec7a1d..b696bedcd02 100644 --- a/src/guides/v2.3/graphql/payment-methods/braintree-vault.md +++ b/src/guides/v2.3/graphql/payment-methods/braintree-vault.md @@ -20,7 +20,7 @@ The following diagram shows the workflow for placing an order when Braintree Vau 1. 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`]({{page.baseurl}}/graphql/mutations/set-payment-method.html) mutation to set the payment method to [`braintree_cc_vault`](#braintree_cc_vault-object). The vaulted public hash is passed with other optional properties in the [`braintree_cc_vault`](#braintree_cc_vault-object). + When the customer selects a stored payment method, the PWA uses the [`setPaymentMethodOnCart`]({{page.baseurl}}/graphql/mutations/set-payment-method.html) mutation to set the payment method to [`braintree_cc_vault`](#braintree_cc_vault-object). The vaulted public hash is passed with other optional properties in the `braintree_cc_vault`. 1. Magento returns a `Cart` object.