@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/README.md
CHANGED
|
@@ -103,6 +103,8 @@ Run:
|
|
|
103
103
|
STRIPE_API_KEY=sk_test_xxx bun quickstart.ts
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
+
Note: if you include `customer.name` for Stripe shipping details, also include `customer.address` to avoid provider validation errors.
|
|
107
|
+
|
|
106
108
|
## Documentation
|
|
107
109
|
|
|
108
110
|
- [Routing](./docs/routing.md)
|
package/dist/index.cjs
CHANGED
|
@@ -2109,8 +2109,21 @@ var StripeAdapter = class _StripeAdapter {
|
|
|
2109
2109
|
if (request.customer?.email) {
|
|
2110
2110
|
body.receipt_email = request.customer.email;
|
|
2111
2111
|
}
|
|
2112
|
-
if (request.customer?.
|
|
2113
|
-
|
|
2112
|
+
if (request.customer?.address) {
|
|
2113
|
+
const { address, name } = request.customer;
|
|
2114
|
+
if (name) {
|
|
2115
|
+
body["shipping[name]"] = name;
|
|
2116
|
+
}
|
|
2117
|
+
body["shipping[address][line1]"] = address.line1;
|
|
2118
|
+
if (address.line2) {
|
|
2119
|
+
body["shipping[address][line2]"] = address.line2;
|
|
2120
|
+
}
|
|
2121
|
+
body["shipping[address][city]"] = address.city;
|
|
2122
|
+
if (address.state) {
|
|
2123
|
+
body["shipping[address][state]"] = address.state;
|
|
2124
|
+
}
|
|
2125
|
+
body["shipping[address][postal_code]"] = address.postalCode;
|
|
2126
|
+
body["shipping[address][country]"] = address.country;
|
|
2114
2127
|
}
|
|
2115
2128
|
const intent = await this.postForm(
|
|
2116
2129
|
"/v1/payment_intents",
|