@alma/in-page 2.11.0 → 2.12.0
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 +30 -0
- package/dist/index.es.js +450 -438
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +148 -148
- package/dist/index.umd.js.map +1 -1
- package/dist/src/Embedded/eligibility.d.ts +1 -0
- package/dist/src/Embedded/fallback.d.ts +1 -1
- package/dist/src/Modal/modal.d.ts +2 -1
- package/dist/src/messages/listener.d.ts +1 -1
- package/dist/src/mount.d.ts +1 -1
- package/dist/src/store.d.ts +2 -4
- package/dist/src/types.d.ts +1 -0
- package/dist/src/unmount.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,6 +35,36 @@ inPage.startPayment({
|
|
|
35
35
|
The complete flow looks like this :
|
|
36
36
|

|
|
37
37
|
|
|
38
|
+
## Billing country (optional)
|
|
39
|
+
|
|
40
|
+
If you already know your customer's billing country, pass it with the `billingCountry` option. Alma then displays the payment plan and fees that apply to that country.
|
|
41
|
+
|
|
42
|
+
The value can be either an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code or a full country name (in any language):
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
// Using an ISO country code
|
|
46
|
+
const inPage = Alma.InPage.initialize({
|
|
47
|
+
merchantId: "merchantId",
|
|
48
|
+
selector: "#alma-inpage",
|
|
49
|
+
amountInCents: 10000,
|
|
50
|
+
installmentsCount: 3,
|
|
51
|
+
billingCountry: "DE",
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// Using a full country name
|
|
55
|
+
const inPage = Alma.InPage.initialize({
|
|
56
|
+
merchantId: "merchantId",
|
|
57
|
+
selector: "#alma-inpage",
|
|
58
|
+
amountInCents: 10000,
|
|
59
|
+
installmentsCount: 3,
|
|
60
|
+
billingCountry: "Allemagne",
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
When `billingCountry` is omitted, the default payment plan of your account is displayed.
|
|
65
|
+
|
|
66
|
+
If the billing country changes after the initialization (e.g. the customer edits their address), call `inPage.unmount()` and `initialize` again with the new country.
|
|
67
|
+
|
|
38
68
|
## Going further
|
|
39
69
|
|
|
40
70
|
Read the [full documentation](https://docs.almapay.com/docs/integration-in-page) to learn more about InPage API.
|