@m2c/checkout 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ Live publishable keys require HTTPS origins. Test publishable keys
|
|
|
56
56
|
```ts
|
|
57
57
|
const client = createClient({
|
|
58
58
|
baseUrl: 'https://api.m2cmarkets.com',
|
|
59
|
-
publishableKey: '
|
|
59
|
+
publishableKey: 'pub_...',
|
|
60
60
|
// default statusSource is { kind: 'm2c' } - poll the M2C advisory read endpoint
|
|
61
61
|
});
|
|
62
62
|
|
|
@@ -81,7 +81,7 @@ calling `resume()`:
|
|
|
81
81
|
|
|
82
82
|
```ts
|
|
83
83
|
// On your success_url and cancel_url pages:
|
|
84
|
-
const client = createClient({ baseUrl: 'https://api.m2cmarkets.com', publishableKey: '
|
|
84
|
+
const client = createClient({ baseUrl: 'https://api.m2cmarkets.com', publishableKey: 'pub_...' });
|
|
85
85
|
|
|
86
86
|
const result = await client.resume({ outcome: 'success' }); // or 'cancel'
|
|
87
87
|
// result is null if no checkout was in progress, otherwise one of:
|
|
@@ -115,7 +115,7 @@ separate checkout window:
|
|
|
115
115
|
```ts
|
|
116
116
|
const client = createClient({
|
|
117
117
|
baseUrl: 'https://api.m2cmarkets.com',
|
|
118
|
-
publishableKey: '
|
|
118
|
+
publishableKey: 'pub_...',
|
|
119
119
|
launchMode: 'popup', // or 'new_tab'
|
|
120
120
|
returnTimeoutMs: 60000, // optional fallback for abandoned popup/new-tab flows
|
|
121
121
|
});
|
|
@@ -136,7 +136,7 @@ and storage configuration:
|
|
|
136
136
|
```ts
|
|
137
137
|
const client = createClient({
|
|
138
138
|
baseUrl: 'https://api.m2cmarkets.com',
|
|
139
|
-
publishableKey: '
|
|
139
|
+
publishableKey: 'pub_...',
|
|
140
140
|
launchMode: 'popup', // same value used before start()
|
|
141
141
|
});
|
|
142
142
|
|
package/package.json
CHANGED