You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 8, 2021. It is now read-only.
gocommerce.updateCard("netlify-mug-01", 3); // Set to 0 to remove
46
+
commerce.updateCard("netlify-mug-01", 3); // Set to 0 to remove
47
47
48
-
gocommerce.order({
48
+
commerce.order({
49
49
email:"matt@netlify.com",
50
50
shipping_address: {
51
51
first_name:"Matt",
@@ -59,40 +59,40 @@ gocommerce.order({
59
59
}
60
60
/* You can optionally specify billing_address as well */
61
61
}).then(({cart, order}) => {
62
-
returngocommerce.payment({
62
+
returncommerce.payment({
63
63
// Get a token from Stripes button or a custom integration
64
64
"stripe_token":TOKEN_FROM_STRIPE_CC_FORM,
65
-
// The gocommerce API will verify that the amount and order ID match
65
+
// The commerce API will verify that the amount and order ID match
66
66
"amount":cart.total.cents,
67
67
"order_id":order.id,
68
68
})
69
69
}).then((transaction) => {
70
70
console.log("Order confirmed!")
71
71
});
72
72
73
-
gocommerce.clearCart(); // Will be called automatically after a successful order
73
+
commerce.clearCart(); // Will be called automatically after a successful order
74
74
```
75
75
76
76
You can change country (for VAT calculations) or currency at any time:
77
77
78
78
```
79
-
gocommerce.setCountry("USA");
80
-
gocommerce.setCurrency("USD");
79
+
commerce.setCountry("USA");
80
+
commerce.setCurrency("USD");
81
81
```
82
82
83
-
You can use `gocommerce` together with [authlify](https://github.com/netlify/authlify) to let users log in and claim view order history.
83
+
You can use Netlify Commerce JS together with [authlify](https://github.com/netlify/authlify) to let users log in and claim view order history.
0 commit comments