Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 9c861f0

Browse files
Update braintree-vault.md (#8345)
* Update braintree-vault.md Request data is invalid. Syntax Error: Expected Name, found <EOF>". * Update braintree-vault.md
1 parent 947e1a6 commit 9c861f0

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/guides/v2.3/graphql/payment-methods/braintree-vault.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The following diagram shows the workflow for placing an order when Braintree Vau
2020

2121
1. The client renders the token information, and the customer selects a payment method.
2222

23-
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).
23+
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`.
2424

2525
1. Magento returns a `Cart` object.
2626

@@ -35,7 +35,7 @@ The following diagram shows the workflow for placing an order when Braintree Vau
3535
## `setPaymentMethodOnCart` mutation
3636

3737
When you set the payment method to Braintree in the [`setPaymentMethodOnCart`]({{page.baseurl}}/graphql/mutations/set-payment-method.html)
38-
mutation, the `payment_method` object must contain a `braintree_cc_vault` object.
38+
mutation, the `payment_method` object must contain a [`braintree_cc_vault`](#braintree_cc_vault-object) object.
3939

4040
### braintree_cc_vault object
4141

@@ -54,18 +54,20 @@ The following example shows the `setPaymentMethodOnCart` mutation constructed fo
5454

5555
```graphql
5656
mutation {
57-
setPaymentMethodOnCart(input: {
58-
cart_id: "IeTUiU0oCXjm0uRqGCOuhQ2AuQatogjG"
59-
payment_method: {
60-
code: "braintree_cc_vault"
61-
braintree_cc_vault: {
62-
public_hash: "fake-public-hash"
57+
setPaymentMethodOnCart(
58+
input: {
59+
cart_id: "IeTUiU0oCXjm0uRqGCOuhQ2AuQatogjG"
60+
payment_method: {
61+
code: "braintree_cc_vault"
62+
braintree_cc_vault: { public_hash: "fake-public-hash" }
6363
}
6464
}
65-
}) {
66-
cart {
67-
selected_payment_method {
68-
code
65+
) {
66+
cart {
67+
selected_payment_method {
68+
code
69+
title
70+
}
6971
}
7072
}
7173
}
@@ -80,6 +82,7 @@ mutation {
8082
"cart": {
8183
"selected_payment_method": {
8284
"code": "braintree_cc_vault"
85+
"title": "Stored Cards"
8386
}
8487
}
8588
}

0 commit comments

Comments
 (0)