@drawbridge/drawbridge-stripe 0.0.5 → 0.0.7
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/dist/index.js +9 -5
- package/dist/index.mjs +9 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21,11 +21,18 @@ var require_billing = __commonJS({
|
|
|
21
21
|
const subscribe = async ({
|
|
22
22
|
currency: currency2,
|
|
23
23
|
customer,
|
|
24
|
-
default_payment_method,
|
|
24
|
+
default_payment_method = null,
|
|
25
25
|
metadata = {}
|
|
26
26
|
}) => {
|
|
27
27
|
var _a, _b, _c, _d;
|
|
28
28
|
try {
|
|
29
|
+
const billing_profile_data = {
|
|
30
|
+
customer
|
|
31
|
+
};
|
|
32
|
+
if (Boolean(default_payment_method)) {
|
|
33
|
+
billing_profile_data["default_payment_method"] = default_payment_method;
|
|
34
|
+
}
|
|
35
|
+
;
|
|
29
36
|
const { data: intent } = await axios.post(
|
|
30
37
|
billing + "/intents",
|
|
31
38
|
{
|
|
@@ -39,10 +46,7 @@ var require_billing = __commonJS({
|
|
|
39
46
|
}
|
|
40
47
|
},
|
|
41
48
|
payer: {
|
|
42
|
-
billing_profile_data
|
|
43
|
-
customer,
|
|
44
|
-
default_payment_method
|
|
45
|
-
}
|
|
49
|
+
billing_profile_data
|
|
46
50
|
}
|
|
47
51
|
},
|
|
48
52
|
actions: [
|
package/dist/index.mjs
CHANGED
|
@@ -27,11 +27,18 @@ var require_billing = __commonJS({
|
|
|
27
27
|
const subscribe = async ({
|
|
28
28
|
currency: currency2,
|
|
29
29
|
customer,
|
|
30
|
-
default_payment_method,
|
|
30
|
+
default_payment_method = null,
|
|
31
31
|
metadata = {}
|
|
32
32
|
}) => {
|
|
33
33
|
var _a, _b, _c, _d;
|
|
34
34
|
try {
|
|
35
|
+
const billing_profile_data = {
|
|
36
|
+
customer
|
|
37
|
+
};
|
|
38
|
+
if (Boolean(default_payment_method)) {
|
|
39
|
+
billing_profile_data["default_payment_method"] = default_payment_method;
|
|
40
|
+
}
|
|
41
|
+
;
|
|
35
42
|
const { data: intent } = await axios.post(
|
|
36
43
|
billing + "/intents",
|
|
37
44
|
{
|
|
@@ -45,10 +52,7 @@ var require_billing = __commonJS({
|
|
|
45
52
|
}
|
|
46
53
|
},
|
|
47
54
|
payer: {
|
|
48
|
-
billing_profile_data
|
|
49
|
-
customer,
|
|
50
|
-
default_payment_method
|
|
51
|
-
}
|
|
55
|
+
billing_profile_data
|
|
52
56
|
}
|
|
53
57
|
},
|
|
54
58
|
actions: [
|
package/package.json
CHANGED