@vaultsaas/core 0.1.0 → 0.1.1
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 +2 -0
- package/dist/index.cjs +15 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.js
CHANGED
|
@@ -2046,8 +2046,21 @@ var StripeAdapter = class _StripeAdapter {
|
|
|
2046
2046
|
if (request.customer?.email) {
|
|
2047
2047
|
body.receipt_email = request.customer.email;
|
|
2048
2048
|
}
|
|
2049
|
-
if (request.customer?.
|
|
2050
|
-
|
|
2049
|
+
if (request.customer?.address) {
|
|
2050
|
+
const { address, name } = request.customer;
|
|
2051
|
+
if (name) {
|
|
2052
|
+
body["shipping[name]"] = name;
|
|
2053
|
+
}
|
|
2054
|
+
body["shipping[address][line1]"] = address.line1;
|
|
2055
|
+
if (address.line2) {
|
|
2056
|
+
body["shipping[address][line2]"] = address.line2;
|
|
2057
|
+
}
|
|
2058
|
+
body["shipping[address][city]"] = address.city;
|
|
2059
|
+
if (address.state) {
|
|
2060
|
+
body["shipping[address][state]"] = address.state;
|
|
2061
|
+
}
|
|
2062
|
+
body["shipping[address][postal_code]"] = address.postalCode;
|
|
2063
|
+
body["shipping[address][country]"] = address.country;
|
|
2051
2064
|
}
|
|
2052
2065
|
const intent = await this.postForm(
|
|
2053
2066
|
"/v1/payment_intents",
|