@justifi/webcomponents 4.19.1-rc-5 → 4.19.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/dist/cjs/{Analytics-8949ea18.js → Analytics-f870b3ee.js} +3 -2
- package/dist/cjs/{business-additional-questions-schema-cf545610.js → business-additional-questions-schema-11ce0005.js} +1 -1
- package/dist/cjs/{business-form-options-582467fe.js → business-form-options-26f9900c.js} +1 -1
- package/dist/cjs/{business.service-6bb7ac82.js → business.service-f63650f5.js} +6 -5
- package/dist/cjs/config-ff2dda66.js +15 -0
- package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
- package/dist/cjs/form-control-checkbox_9.cjs.entry.js +4 -4
- package/dist/cjs/{get-payout-csv-1391ff3e.js → get-payout-csv-f3aee6d0.js} +4 -3
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +10 -9
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -4
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +4 -3
- package/dist/cjs/justifi-business-form.cjs.entry.js +9 -8
- package/dist/cjs/justifi-card-form.cjs.entry.js +5 -4
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkout.cjs.entry.js +5 -4
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -3
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +9 -11
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payment-details.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +4 -3
- package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -2
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -4
- package/dist/cjs/{package-a3cbc925.js → package-1321b070.js} +4 -2
- package/dist/cjs/{payload-parsers-1cbc3b57.js → payload-parsers-969ab9b6.js} +1 -1
- package/dist/cjs/{payment.service-dfcfa19b.js → payment.service-0a64f9cd.js} +3 -2
- package/dist/cjs/{schema-validations-2733de42.js → schema-validations-f3db892c.js} +1 -1
- package/dist/collection/api/services/analytics.service.js +2 -1
- package/dist/collection/api/services/business.service.js +6 -5
- package/dist/collection/api/services/checkout.service.js +3 -2
- package/dist/collection/api/services/insurance.service.js +3 -2
- package/dist/collection/api/services/payment.service.js +3 -2
- package/dist/collection/api/services/payout.service.js +4 -3
- package/dist/collection/api/services/provision.service.js +4 -2
- package/dist/collection/api/services/reports.service.js +2 -1
- package/dist/collection/components/bank-account-form/bank-account-form.js +4 -3
- package/dist/collection/components/business-forms/business-form/business-form.js +3 -2
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +3 -2
- package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +3 -2
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +3 -2
- package/dist/collection/components/business-forms/utils/business-form-options.js +1 -1
- package/dist/collection/components/card-form/card-form.js +4 -3
- package/dist/collection/components/checkout/checkout-core.js +4 -4
- package/dist/collection/components/checkout/new-payment-method.js +4 -6
- package/dist/collection/components/checkout/payment-method-options.js +4 -3
- package/dist/collection/components/checkout/saved-payment-method.js +4 -3
- package/dist/collection/components/checkout/sezzle-payment-method.js +4 -3
- package/dist/collection/components/payment-form/payment-form.js +4 -3
- package/dist/collection/components/refund-form/refund-form.js +3 -2
- package/dist/config.js +11 -0
- package/dist/docs.json +8 -8
- package/dist/esm/{Analytics-38d3bafb.js → Analytics-262cdde5.js} +3 -2
- package/dist/esm/{business-additional-questions-schema-956e3caf.js → business-additional-questions-schema-e39bc781.js} +1 -1
- package/dist/esm/{business-form-options-7a9a74fc.js → business-form-options-0b08e08c.js} +1 -1
- package/dist/esm/{business.service-f45decfc.js → business.service-74bd1212.js} +6 -5
- package/dist/esm/config-476c7241.js +13 -0
- package/dist/esm/form-alert_5.entry.js +1 -1
- package/dist/esm/form-control-checkbox_9.entry.js +4 -4
- package/dist/esm/{get-payout-csv-e784a2ab.js → get-payout-csv-b494abfe.js} +4 -3
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +10 -9
- package/dist/esm/justifi-bank-account-form.entry.js +5 -4
- package/dist/esm/justifi-billing-form_2.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +4 -3
- package/dist/esm/justifi-business-form.entry.js +9 -8
- package/dist/esm/justifi-card-form.entry.js +5 -4
- package/dist/esm/justifi-checkout-core.entry.js +3 -3
- package/dist/esm/justifi-checkout.entry.js +5 -4
- package/dist/esm/justifi-gross-payment-chart.entry.js +4 -3
- package/dist/esm/justifi-new-payment-method_4.entry.js +9 -11
- package/dist/esm/justifi-owner-form_3.entry.js +5 -4
- package/dist/esm/justifi-payment-details.entry.js +4 -3
- package/dist/esm/justifi-payment-form.entry.js +6 -5
- package/dist/esm/justifi-payment-method-form.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +6 -5
- package/dist/esm/justifi-payments-list.entry.js +4 -3
- package/dist/esm/justifi-payout-details.entry.js +4 -3
- package/dist/esm/justifi-payouts-list.entry.js +4 -3
- package/dist/esm/justifi-refund-form.entry.js +3 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -4
- package/dist/esm/{package-89734008.js → package-d88677e9.js} +4 -2
- package/dist/esm/{payload-parsers-acb719d1.js → payload-parsers-62f443e1.js} +1 -1
- package/dist/esm/{payment.service-dad5153b.js → payment.service-3ca4a492.js} +3 -2
- package/dist/esm/{schema-validations-a83ff220.js → schema-validations-2f4fdebb.js} +1 -1
- package/dist/module/Analytics.js +2 -1
- package/dist/module/business-bank-account-form-step.js +3 -2
- package/dist/module/business-document-upload-form-step.js +3 -2
- package/dist/module/business-form-options.js +1 -1
- package/dist/module/business-terms-conditions-form-step.js +3 -2
- package/dist/module/business.service.js +6 -5
- package/dist/module/checkout-core.js +3 -3
- package/dist/module/config.js +13 -0
- package/dist/module/get-payout-csv.js +4 -3
- package/dist/module/justifi-bank-account-form.js +3 -2
- package/dist/module/justifi-business-form.js +3 -2
- package/dist/module/justifi-card-form.js +3 -2
- package/dist/module/justifi-checkout.js +3 -2
- package/dist/module/justifi-gross-payment-chart.js +2 -1
- package/dist/module/justifi-payment-form.js +4 -3
- package/dist/module/justifi-payment-provisioning.js +3 -2
- package/dist/module/justifi-refund-form.js +3 -2
- package/dist/module/justifi-season-interruption-insurance.js +3 -2
- package/dist/module/new-payment-method.js +3 -5
- package/dist/module/package.js +4 -2
- package/dist/module/payment-method-options.js +3 -2
- package/dist/module/payment.service.js +3 -2
- package/dist/module/saved-payment-method.js +3 -2
- package/dist/module/sezzle-payment-method.js +3 -2
- package/dist/types/components/checkout/new-payment-method.d.ts +0 -1
- package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +11 -0
- package/dist/webcomponents/index.esm.js +0 -1
- package/dist/webcomponents/p-04a0dbb6.js +1 -0
- package/dist/webcomponents/p-061dcb79.entry.js +1 -0
- package/dist/webcomponents/p-07109641.entry.js +1 -0
- package/dist/webcomponents/p-08b0fb31.js +1 -41
- package/dist/webcomponents/p-0f7b9555.entry.js +1 -0
- package/dist/webcomponents/p-14c91ffd.js +1 -20
- package/dist/webcomponents/p-198994c0.entry.js +1 -0
- package/dist/webcomponents/p-1a43e355.entry.js +19 -0
- package/dist/webcomponents/p-1ad5995e.js +1 -3599
- package/dist/webcomponents/p-1f70fa27.entry.js +1 -0
- package/dist/webcomponents/p-1ff8810b.js +1 -29
- package/dist/webcomponents/p-2338affa.js +1 -213
- package/dist/webcomponents/p-241b0ed9.js +1 -0
- package/dist/webcomponents/p-2799383d.entry.js +1 -0
- package/dist/webcomponents/p-29c0b182.js +1 -114
- package/dist/webcomponents/p-2b6c9c4f.js +1 -7
- package/dist/webcomponents/p-2eab3c90.js +1 -3052
- package/dist/webcomponents/p-3affadfc.entry.js +1 -0
- package/dist/webcomponents/p-3d4d566d.entry.js +1 -0
- package/dist/webcomponents/p-3dd4c6c3.entry.js +1 -0
- package/dist/webcomponents/p-462dc522.entry.js +1 -0
- package/dist/webcomponents/p-46f679a9.js +1 -0
- package/dist/webcomponents/p-487b72a8.entry.js +1 -0
- package/dist/webcomponents/p-48ae16e0.entry.js +1 -0
- package/dist/webcomponents/p-4abc17f0.entry.js +1 -0
- package/dist/webcomponents/p-4bac636e.entry.js +1 -0
- package/dist/webcomponents/p-52021fa1.entry.js +1 -0
- package/dist/webcomponents/p-525db3e8.js +1 -22
- package/dist/webcomponents/p-53948ff8.entry.js +1 -0
- package/dist/webcomponents/p-53e64f15.entry.js +1 -0
- package/dist/webcomponents/p-554a3c18.js +1 -0
- package/dist/webcomponents/p-56f6ce4c.js +1 -10
- package/dist/webcomponents/p-5968ff8a.js +1 -178
- package/dist/webcomponents/p-6078a370.js +1 -244
- package/dist/webcomponents/p-60a370fc.entry.js +1 -0
- package/dist/webcomponents/p-62b32c4c.entry.js +1 -0
- package/dist/webcomponents/p-65b561da.entry.js +1 -0
- package/dist/webcomponents/p-72c9e6b3.entry.js +1 -0
- package/dist/webcomponents/p-75b4daef.js +1 -0
- package/dist/webcomponents/p-7d85af5c.js +1 -16
- package/dist/webcomponents/p-8115b2f4.js +1 -28
- package/dist/webcomponents/p-83125497.js +1 -4027
- package/dist/webcomponents/p-8603348a.js +1 -0
- package/dist/webcomponents/p-890b3254.entry.js +1 -0
- package/dist/webcomponents/p-8df7bde8.js +1 -27
- package/dist/webcomponents/p-92bb1e5f.entry.js +1 -0
- package/dist/webcomponents/p-9c9c7dac.js +1 -24
- package/dist/webcomponents/p-9ccfa1c9.entry.js +1 -0
- package/dist/webcomponents/p-9dc36f76.entry.js +1 -0
- package/dist/webcomponents/p-ad41c8c7.entry.js +1 -0
- package/dist/webcomponents/p-ae263544.js +1 -0
- package/dist/webcomponents/p-af244664.js +1 -126
- package/dist/webcomponents/p-b16dfd5d.entry.js +1 -0
- package/dist/webcomponents/p-ba4bae6f.js +1 -12
- package/dist/webcomponents/p-bbed6107.entry.js +1 -0
- package/dist/webcomponents/p-bc92235c.entry.js +1 -0
- package/dist/webcomponents/p-be39c802.entry.js +1 -0
- package/dist/webcomponents/p-c9f8f7ec.entry.js +1 -0
- package/dist/webcomponents/p-d101c5db.js +1 -0
- package/dist/webcomponents/p-d1c8d794.entry.js +1 -0
- package/dist/webcomponents/p-d25c2f12.js +1 -0
- package/dist/webcomponents/p-d2a5054f.entry.js +1 -0
- package/dist/webcomponents/p-d765d638.js +1 -0
- package/dist/webcomponents/p-d8355f91.entry.js +1 -0
- package/dist/webcomponents/p-d89bad72.js +1 -39
- package/dist/webcomponents/p-dce846bf.js +1 -27
- package/dist/webcomponents/p-df21aaad.js +1 -120
- package/dist/webcomponents/p-e1255160.js +1 -3
- package/dist/webcomponents/p-e2c88817.entry.js +1 -0
- package/dist/webcomponents/p-e31f0f3e.entry.js +1 -0
- package/dist/webcomponents/p-e333620e.js +1 -34
- package/dist/webcomponents/p-e3fab0e2.js +1 -43
- package/dist/webcomponents/p-f0866375.entry.js +1 -0
- package/dist/webcomponents/p-fad19d75.js +2 -1638
- package/dist/webcomponents/p-fb58feb5.entry.js +1 -0
- package/dist/webcomponents/p-fe33151d.entry.js +1 -0
- package/dist/webcomponents/webcomponents.css +4 -362
- package/dist/webcomponents/webcomponents.esm.js +1 -20
- package/package.json +4 -2
- package/dist/globals.d.ts +0 -2
- package/dist/webcomponents/p-0179fbb2.entry.js +0 -1684
- package/dist/webcomponents/p-01a404ca.entry.js +0 -44
- package/dist/webcomponents/p-03d35880.entry.js +0 -130
- package/dist/webcomponents/p-06ff0429.entry.js +0 -65
- package/dist/webcomponents/p-220fc2cc.entry.js +0 -98
- package/dist/webcomponents/p-258b1ee2.entry.js +0 -149
- package/dist/webcomponents/p-25d8cd65.entry.js +0 -102
- package/dist/webcomponents/p-2988ac56.js +0 -79
- package/dist/webcomponents/p-2e405359.entry.js +0 -73
- package/dist/webcomponents/p-3e9ef4a8.js +0 -28
- package/dist/webcomponents/p-3fd13ca3.js +0 -52
- package/dist/webcomponents/p-5482d030.entry.js +0 -21
- package/dist/webcomponents/p-576826b1.entry.js +0 -43
- package/dist/webcomponents/p-5cb3f0b2.entry.js +0 -261
- package/dist/webcomponents/p-5f835b89.entry.js +0 -606
- package/dist/webcomponents/p-6fed319e.entry.js +0 -99
- package/dist/webcomponents/p-70a2aa74.entry.js +0 -76
- package/dist/webcomponents/p-74d0d0e1.entry.js +0 -75
- package/dist/webcomponents/p-7582b554.entry.js +0 -18
- package/dist/webcomponents/p-79646550.entry.js +0 -61
- package/dist/webcomponents/p-7b0400cd.entry.js +0 -131
- package/dist/webcomponents/p-800d31fe.entry.js +0 -162
- package/dist/webcomponents/p-85fc69e5.js +0 -90
- package/dist/webcomponents/p-890088fc.entry.js +0 -298
- package/dist/webcomponents/p-89887332.js +0 -301
- package/dist/webcomponents/p-8eb774df.entry.js +0 -54
- package/dist/webcomponents/p-9f94bbb6.entry.js +0 -118
- package/dist/webcomponents/p-a2da97f2.entry.js +0 -145
- package/dist/webcomponents/p-a5a225d9.entry.js +0 -125
- package/dist/webcomponents/p-a5c5821e.entry.js +0 -101
- package/dist/webcomponents/p-a5fb51dc.entry.js +0 -131
- package/dist/webcomponents/p-a6d04afc.js +0 -44
- package/dist/webcomponents/p-ac086069.entry.js +0 -58
- package/dist/webcomponents/p-ad5cfa9d.js +0 -77
- package/dist/webcomponents/p-b82c146f.entry.js +0 -111
- package/dist/webcomponents/p-b9a41ec2.entry.js +0 -74
- package/dist/webcomponents/p-ba5fae28.js +0 -90
- package/dist/webcomponents/p-c636f563.entry.js +0 -791
- package/dist/webcomponents/p-c64abefc.entry.js +0 -117
- package/dist/webcomponents/p-cb26f708.js +0 -18
- package/dist/webcomponents/p-cbf2437a.entry.js +0 -80
- package/dist/webcomponents/p-d17aee2b.entry.js +0 -26
- package/dist/webcomponents/p-d894aed2.entry.js +0 -133
- package/dist/webcomponents/p-e356f280.entry.js +0 -29
- package/dist/webcomponents/p-e837a453.entry.js +0 -94
- package/dist/webcomponents/p-e84a2dcb.entry.js +0 -97
- package/dist/webcomponents/p-ec2bd24f.entry.js +0 -94
- package/dist/webcomponents/p-ec854a3e.entry.js +0 -11053
- package/dist/webcomponents/p-f02b75dc.entry.js +0 -96
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
import JustifiAnalytics from "../../api/Analytics";
|
|
3
4
|
export class CardForm {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.validationMode = undefined;
|
|
6
|
-
this.iframeOrigin =
|
|
7
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
7
8
|
this.singleLine = false;
|
|
8
9
|
this.internalStyleOverrides = undefined;
|
|
9
10
|
}
|
|
@@ -56,7 +57,7 @@ export class CardForm {
|
|
|
56
57
|
return this.childRef.resize();
|
|
57
58
|
}
|
|
58
59
|
render() {
|
|
59
|
-
return (h("justifi-payment-method-form", { key: '
|
|
60
|
+
return (h("justifi-payment-method-form", { key: '58843b8a47f35d716845de11f6a66d8960bc0776', ref: el => {
|
|
60
61
|
if (el) {
|
|
61
62
|
this.childRef = el;
|
|
62
63
|
}
|
|
@@ -98,7 +99,7 @@ export class CardForm {
|
|
|
98
99
|
},
|
|
99
100
|
"attribute": "iframe-origin",
|
|
100
101
|
"reflect": false,
|
|
101
|
-
"defaultValue": "
|
|
102
|
+
"defaultValue": "config.iframeOrigin"
|
|
102
103
|
},
|
|
103
104
|
"singleLine": {
|
|
104
105
|
"type": "boolean",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { formatCurrency } from "../../utils/utils";
|
|
3
|
+
import { config } from "../../../config";
|
|
3
4
|
import { Checkout } from "../../api/Checkout";
|
|
4
5
|
import { ComponentErrorSeverity } from "../../api/ComponentError";
|
|
5
6
|
import { insuranceValues, insuranceValuesOn, validateInsuranceValues } from "../insurance/insurance-state";
|
|
@@ -26,7 +27,7 @@ export class CheckoutCore {
|
|
|
26
27
|
});
|
|
27
28
|
this.renderState = 'error';
|
|
28
29
|
};
|
|
29
|
-
this.iframeOrigin =
|
|
30
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
30
31
|
this.authToken = undefined;
|
|
31
32
|
this.getCheckout = undefined;
|
|
32
33
|
this.complete = undefined;
|
|
@@ -46,7 +47,6 @@ export class CheckoutCore {
|
|
|
46
47
|
this.paymentMethodOptionsRef.fillBillingForm(fields);
|
|
47
48
|
}
|
|
48
49
|
componentWillLoad() {
|
|
49
|
-
console.log('CheckoutCore: componentWillLoad iframeOrigin', this, this.iframeOrigin);
|
|
50
50
|
if (this.getCheckout) {
|
|
51
51
|
this.fetchData();
|
|
52
52
|
// Refresh the checkout data when insurance is added or removed
|
|
@@ -123,7 +123,7 @@ export class CheckoutCore {
|
|
|
123
123
|
return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h(Skeleton, { height: "24px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("div", { class: "jfi-payment-description" }, (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_description), h("div", { class: "jfi-payment-total" }, h("span", { class: "jfi-payment-total-label" }, "Total"), "\u00A0", h("span", { class: "jfi-payment-total-amount" }, formatCurrency(+((_b = this.checkout) === null || _b === void 0 ? void 0 : _b.total_amount)))))));
|
|
124
124
|
}
|
|
125
125
|
render() {
|
|
126
|
-
return (h(StyledHost, { key: '
|
|
126
|
+
return (h(StyledHost, { key: 'e322f280a57bb0baab61174bca21f0a7e9afa3c1' }, h("div", { key: '4ad8cc4f6243de8ddc03fb184ac4e960a04280eb', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '7f13e26b36790558c8eb455f4d5ab3d0952b4e62', class: "col-12" }, h("h2", { key: 'c5e4b6fc30f51821537915f3ce5d4830ed3f8da9', class: "fs-5 fw-bold pb-3 jfi-header" }, "Summary"), this.summary), h("div", { key: '164b7a2cc51d871ad4a92044d0f7240e376bd4b3', class: "col-12" }, h("slot", { key: 'a98b7c6a0bb9e4d1b102e832ee7aa43218432298', name: "insurance" })), h("div", { key: '415d3aac64b4190f54d785695c50a92ce02a76c2', class: "col-12 mt-4" }, h("h2", { key: '6d7f0df1165ec359877459a8bada855ef353c3b3', class: "fs-5 fw-bold pb-3 jfi-header" }, "Payment"), h("h3", { key: 'be8495d792cf065d2cbc7d3b46648c887951e313', class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { key: '5c9d8baffb50b0b10e9911463f307581cad7619c', class: "d-flex flex-column" }, this.paymentType)), h("div", { key: '9351832b69a8e5285cae35534299b51193248719', class: "col-12" }, h("div", { key: '5b0e382836c858369caf93a287272922024ce72b', class: "d-flex justify-content-end" }, h(Button, { key: 'f76d37000f7b026e97f083e7cf817bed8f84f34f', type: "submit", variant: "primary", onClick: (e) => this.submit(e), disabled: this.isLoading, isLoading: this.isLoading, style: { width: '100%' } }, "Pay"))))));
|
|
127
127
|
}
|
|
128
128
|
static get is() { return "justifi-checkout-core"; }
|
|
129
129
|
static get encapsulation() { return "shadow"; }
|
|
@@ -155,7 +155,7 @@ export class CheckoutCore {
|
|
|
155
155
|
},
|
|
156
156
|
"attribute": "iframe-origin",
|
|
157
157
|
"reflect": false,
|
|
158
|
-
"defaultValue": "
|
|
158
|
+
"defaultValue": "config.iframeOrigin"
|
|
159
159
|
},
|
|
160
160
|
"authToken": {
|
|
161
161
|
"type": "string",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
const PaymentMethodTypeLabels = {
|
|
3
4
|
bankAccount: 'New bank account',
|
|
4
5
|
card: 'New credit or debit card',
|
|
@@ -8,7 +9,7 @@ export class NewPaymentMethod {
|
|
|
8
9
|
this.onPaymentMethodOptionClick = () => {
|
|
9
10
|
this.paymentMethodOptionSelected.emit(this.paymentMethodOption);
|
|
10
11
|
};
|
|
11
|
-
this.iframeOrigin =
|
|
12
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
12
13
|
this.authToken = undefined;
|
|
13
14
|
this.accountId = undefined;
|
|
14
15
|
this.paymentMethodOption = undefined;
|
|
@@ -16,9 +17,6 @@ export class NewPaymentMethod {
|
|
|
16
17
|
this.isSelected = undefined;
|
|
17
18
|
this.saveNewPaymentMethodChecked = false;
|
|
18
19
|
}
|
|
19
|
-
componentWillLoad() {
|
|
20
|
-
console.log('NewPaymentMethod: componentWillLoad iframeOrigin', this, this.iframeOrigin);
|
|
21
|
-
}
|
|
22
20
|
handleCheckboxChanged(event) {
|
|
23
21
|
this.saveNewPaymentMethodChecked = event.detail;
|
|
24
22
|
}
|
|
@@ -71,7 +69,7 @@ export class NewPaymentMethod {
|
|
|
71
69
|
}
|
|
72
70
|
render() {
|
|
73
71
|
var _a, _b, _c, _d;
|
|
74
|
-
return (h("div", { key: '
|
|
72
|
+
return (h("div", { key: '93c3e6d38d1e18be54006bf82cd6c8148df3518d', class: "payment-method" }, h("div", { key: '6dbb687fbd3e33a6095be7c39ec0974bcc4809b8', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '6c5be962cf5d357211c6716b53d0d8dd3fcf0bb0', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: '796868afd192703a81d94897872dd9c0504cbc1e', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, PaymentMethodTypeLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.id])), this.isSelected ? this.showNewPaymentMethodForm() : null));
|
|
75
73
|
}
|
|
76
74
|
static get is() { return "justifi-new-payment-method"; }
|
|
77
75
|
static get properties() {
|
|
@@ -92,7 +90,7 @@ export class NewPaymentMethod {
|
|
|
92
90
|
},
|
|
93
91
|
"attribute": "iframe-origin",
|
|
94
92
|
"reflect": false,
|
|
95
|
-
"defaultValue": "
|
|
93
|
+
"defaultValue": "config.iframeOrigin"
|
|
96
94
|
},
|
|
97
95
|
"authToken": {
|
|
98
96
|
"type": "string",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
import { PaymentMethodTypes } from "../../api/Payment";
|
|
3
4
|
import { PaymentMethodOption } from "./payment-method-option-utils";
|
|
4
5
|
export class PaymentMethodOptions {
|
|
@@ -12,7 +13,7 @@ export class PaymentMethodOptions {
|
|
|
12
13
|
this.insuranceToggled = undefined;
|
|
13
14
|
this.authToken = undefined;
|
|
14
15
|
this.accountId = undefined;
|
|
15
|
-
this.iframeOrigin =
|
|
16
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
16
17
|
this.savedPaymentMethods = [];
|
|
17
18
|
this.paymentAmount = undefined;
|
|
18
19
|
this.selectedPaymentMethodId = undefined;
|
|
@@ -58,7 +59,7 @@ export class PaymentMethodOptions {
|
|
|
58
59
|
}
|
|
59
60
|
render() {
|
|
60
61
|
var _a;
|
|
61
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '86e309b90ab00f530dd803b00e5aab511f92300f' }, (_a = this.paymentMethodOptions) === null || _a === void 0 ? void 0 : _a.map((paymentMethodOption) => {
|
|
62
63
|
const newCard = paymentMethodOption.id === PaymentMethodTypes.card;
|
|
63
64
|
const newBankAccount = paymentMethodOption.id === PaymentMethodTypes.bankAccount;
|
|
64
65
|
const isSelected = this.selectedPaymentMethodId === paymentMethodOption.id;
|
|
@@ -272,7 +273,7 @@ export class PaymentMethodOptions {
|
|
|
272
273
|
},
|
|
273
274
|
"attribute": "iframe-origin",
|
|
274
275
|
"reflect": false,
|
|
275
|
-
"defaultValue": "
|
|
276
|
+
"defaultValue": "config.iframeOrigin"
|
|
276
277
|
},
|
|
277
278
|
"savedPaymentMethods": {
|
|
278
279
|
"type": "unknown",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Fragment, h } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
import { CardBrandLabels } from "./payment-method-option-utils";
|
|
3
4
|
export class SavedPaymentMethod {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.onPaymentMethodOptionClick = () => {
|
|
6
7
|
this.paymentMethodOptionSelected.emit(this.paymentMethodOption);
|
|
7
8
|
};
|
|
8
|
-
this.iframeOrigin =
|
|
9
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
9
10
|
this.paymentMethodOption = undefined;
|
|
10
11
|
this.isSelected = undefined;
|
|
11
12
|
}
|
|
@@ -19,7 +20,7 @@ export class SavedPaymentMethod {
|
|
|
19
20
|
;
|
|
20
21
|
render() {
|
|
21
22
|
var _a, _b, _c, _d, _e;
|
|
22
|
-
return (h(Fragment, { key: '
|
|
23
|
+
return (h(Fragment, { key: '9c2174123f1675d60bc48d8109821c0bc2ad7682' }, h("div", { key: '07bffce2603110d44f38ffb2f57a60f07faddb3b', class: "payment-method" }, h("div", { key: 'f489d3a05db45c2b2581bc8f0fc093afed453d91', class: "payment-method-header p-3", onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '70681612520aa621c39a017b72b25a7dd3211282', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: 'a58e14ae9d199b0e0eb01b4c0a4a8bd9c8fec41d', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, CardBrandLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.brand], " *", (_e = this.paymentMethodOption) === null || _e === void 0 ? void 0 :
|
|
23
24
|
_e.acct_last_four)))));
|
|
24
25
|
}
|
|
25
26
|
static get is() { return "justifi-saved-payment-method"; }
|
|
@@ -41,7 +42,7 @@ export class SavedPaymentMethod {
|
|
|
41
42
|
},
|
|
42
43
|
"attribute": "iframe-origin",
|
|
43
44
|
"reflect": false,
|
|
44
|
-
"defaultValue": "
|
|
45
|
+
"defaultValue": "config.iframeOrigin"
|
|
45
46
|
},
|
|
46
47
|
"paymentMethodOption": {
|
|
47
48
|
"type": "unknown",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
import { formatCurrency } from "../../utils/utils";
|
|
3
4
|
const sezzleLogo = (h("img", { class: "sezzle-smart-button-logo-img", src: "https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg", alt: "Sezzle", style: {
|
|
4
5
|
display: 'inline',
|
|
@@ -38,7 +39,7 @@ export class SezzlePaymentMethod {
|
|
|
38
39
|
this.sezzleCheckout = checkout;
|
|
39
40
|
this.installmentPlan = this.sezzleCheckout.getInstallmentPlan(amount);
|
|
40
41
|
};
|
|
41
|
-
this.iframeOrigin =
|
|
42
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
42
43
|
this.bnpl = undefined;
|
|
43
44
|
this.clientId = undefined;
|
|
44
45
|
this.accountId = undefined;
|
|
@@ -64,7 +65,7 @@ export class SezzlePaymentMethod {
|
|
|
64
65
|
}
|
|
65
66
|
render() {
|
|
66
67
|
var _a, _b, _c, _d, _e;
|
|
67
|
-
return (h("div", { key: '
|
|
68
|
+
return (h("div", { key: '4deca512311cd98d358c7099141b15538857a4e5', class: "payment-method" }, h("script", { key: '94b232291153bba85efebb101e7e6e816857da96', src: "https://checkout-sdk.sezzle.com/checkout.min.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div", { key: '7cd9052ae6613fe7f187f3a51b7d6ac7087fdeb1', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '1e15e6c2ddced23b049e2559da27532f9be94fb5', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: '0a3637002ef373c05424d6769b070d9db0e66ce8', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, h("div", { key: '6398e2f00088edf8a1a3699e149760744dda4cb1' }, "Buy now, pay later with ", sezzleLogo), this.installmentPlan && (h("small", { key: 'bfd33da875aa5e9f5b649ac8fc7aa5758393b6e8' }, h("span", { key: 'c07fd5d32fe897a45a67140e2cb81b1f4d537c4a' }, (_d = this.installmentPlan) === null || _d === void 0 ? void 0 : _d.installments.length), "\u00A0", h("span", { key: '2b11e4aa6389a4b98cd003c031aed8f01ec8a4df' }, this.installmentPlan.schedule, " payments of"), "\u00A0", h("span", { key: '90cf3bfa1f0d36c8d4719f164d436407d7fc692b', class: "fw-bold" }, formatCurrency((_e = this.installmentPlan) === null || _e === void 0 ? void 0 : _e.installments[0].amountInCents))))))));
|
|
68
69
|
}
|
|
69
70
|
static get is() { return "justifi-sezzle-payment-method"; }
|
|
70
71
|
static get properties() {
|
|
@@ -85,7 +86,7 @@ export class SezzlePaymentMethod {
|
|
|
85
86
|
},
|
|
86
87
|
"attribute": "iframe-origin",
|
|
87
88
|
"reflect": false,
|
|
88
|
-
"defaultValue": "
|
|
89
|
+
"defaultValue": "config.iframeOrigin"
|
|
89
90
|
},
|
|
90
91
|
"bnpl": {
|
|
91
92
|
"type": "any",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { PaymentMethodTypes } from "../../api";
|
|
3
3
|
import { loadFontsOnParent } from "../../utils/utils";
|
|
4
|
+
import { config } from "../../../config";
|
|
4
5
|
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
|
|
5
6
|
import { getErrorMessage } from "../../api/services/utils";
|
|
6
7
|
import JustifiAnalytics from "../../api/Analytics";
|
|
@@ -105,15 +106,15 @@ export class PaymentForm {
|
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
render() {
|
|
108
|
-
return (h(StyledHost, { key: '
|
|
109
|
+
return (h(StyledHost, { key: '38bd6cca38d9068fa9277a8568a98f261a4cc616' }, h("form", { key: 'fec19f5e2f11934e6783124c4c437a2d3947f596', class: "row gy-3" }, this.showPaymentMethodTypeSelector() && (h("div", { key: '18001f78e03336d01de8473a57e3e228e9fce201', class: "col-12" }, h("justifi-payment-method-selector", { key: '260ac1ade3ccfe6baf518eb856bdf4d380025620', selectedPaymentMethodType: this.getSelectedPaymentMethodType(), onPaymentMethodSelected: event => this.paymentMethodSelectedHandler(event) }))), h("div", { key: 'f6ade2336314e05f2bdce75df8577939efe33e3b', class: "col-12" }, h("justifi-payment-method-form", { key: 'ad8e5b121b8425175f7ac7f38ab24dfba1801a28', "payment-method-form-type": this.getSelectedPaymentMethodType(), iframeOrigin: config.iframeOrigin, ref: el => {
|
|
109
110
|
if (el) {
|
|
110
111
|
this.paymentMethodFormRef = el;
|
|
111
112
|
}
|
|
112
|
-
} })), h("div", { key: '
|
|
113
|
+
} })), h("div", { key: '29f15f1cece3e07a569e514d08bf9996405699c6', class: "col-12" }, h("justifi-billing-form", { key: '9928924cc29bfa5c5e46ada294cb26da0c1d222b', legend: "Billing Info", ref: el => {
|
|
113
114
|
if (el) {
|
|
114
115
|
this.billingFormRef = el;
|
|
115
116
|
}
|
|
116
|
-
} })), h("slot", { key: '
|
|
117
|
+
} })), h("slot", { key: 'c36583ab34bc105b506df27aec02898455855cec', name: 'insurance' }), h("div", { key: 'cc38292ae8a59bc6f4624a8535e8b7c93e6f3a35', class: "col-12" }, h(Button, { key: 'e5fe0f50ee2322ab2a199a6229015c9daa198cc0', variant: "primary", type: "submit", onClick: event => this.submit(event), disabled: !this.submitButtonEnabled || this.isLoading, isLoading: this.isLoading, "data-testid": "submit-button", style: { width: '100%' } }, this.submitButtonText || 'Submit')))));
|
|
117
118
|
}
|
|
118
119
|
static get is() { return "justifi-payment-form"; }
|
|
119
120
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,6 +2,7 @@ import { h, } from "@stencil/core";
|
|
|
2
2
|
import RefundFormSchema from "./refund-form-schema";
|
|
3
3
|
import { Api } from "../../api";
|
|
4
4
|
import { FormController } from "../form/form";
|
|
5
|
+
import { config } from "../../../config";
|
|
5
6
|
import { CURRENCY_MASK } from "../../utils/form-input-masks";
|
|
6
7
|
import { StyledHost } from "../../ui-components";
|
|
7
8
|
export class RefundForm {
|
|
@@ -70,11 +71,11 @@ export class RefundForm {
|
|
|
70
71
|
if (!this.authToken) {
|
|
71
72
|
console.warn('Warning: Missing auth-token.');
|
|
72
73
|
}
|
|
73
|
-
this.api = Api({ authToken: this.authToken, apiOrigin:
|
|
74
|
+
this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
|
|
74
75
|
}
|
|
75
76
|
render() {
|
|
76
77
|
var _a;
|
|
77
|
-
return (h(StyledHost, { key: '
|
|
78
|
+
return (h(StyledHost, { key: 'd0d0962eaecab749aa1eb124e86701a2fb4dfd53' }, h("h1", { key: 'cb3071d89c291b1664e551fcf2808a64569ba5eb' }, "Refund"), this.refundInfoText && (h("div", { key: '01a6f4567f882d2eec492ef6d98db7d04747ecb4', class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { key: '8ae5928aaf8ead35a7ad180a01bdde05ebec3d5f', src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { key: '425a7dfe9d8b886b55fd0878f3989373733c1758', class: "m-0", innerHTML: this.refundInfoText }))), h("form", { key: '5516d2ac500611d2410b9b4c2a4d0d15e417b2d1', onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { key: 'b67a7c56f070a5a25d91aa0cc77755b27d420fdc', class: "form-group" }, h("form-control-monetary", { key: '76b6cfdf2b39674434f4d880333dd5d5f603f0b6', name: "amount", label: "Refund Amount", defaultValue: ((_a = this.amount) === null || _a === void 0 ? void 0 : _a.toString()) || '', maskOptions: CURRENCY_MASK.DECIMAL, inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.amount })), h("div", { key: '5e581cdea69d2ce9dbad774214cd904923d199b3', class: "form-group" }, h("form-control-text", { key: '926ae888676a4089d3381bd4d650e6f84f6e206a', name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.notes })), this.withButton && (h("div", { key: 'de5df506b7b64a69a16241f117bf9bea4fd79b57', class: "form-group d-flex flex-row-reverse" }, h("button", { key: '92ad4d43677587c2c20dc03c6f03a6cf1f20ac12', type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
|
|
78
79
|
}
|
|
79
80
|
static get is() { return "justifi-refund-form"; }
|
|
80
81
|
static get encapsulation() { return "shadow"; }
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const config = {
|
|
2
|
+
iframeOrigin: 'https://js.justifi.ai/v2',
|
|
3
|
+
proxyApiOrigin: 'https://wc-proxy.justifi.ai',
|
|
4
|
+
proxyAuthToken: 'eyJraWQiOiJqdXN0aWZpLWUyNDgyMmU3ODE1MmEzZjRkMjU1IiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJodHRwczovL2F1dGguanVzdGlmaS5haS8iLCJhenAiOiJvYXNfMmlsWHBqOHQ2WVlEQ0xWU0FiVFczMiIsInN1YiI6Im9hc18yaWxYcGo4dDZZWURDTFZTQWJUVzMyQHNlc3Npb25zIiwiYXVkIjoiaHR0cHM6Ly9hcGkuanVzdGlmaS5haS92MSIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyIsInBlcm1pc3Npb25zIjpbeyJyb2xlIjoicmVhZDphY2NvdW50IiwicmVzb3VyY2VfaWQiOiJhY2NfNUV0OWlYclNTQVpSMktTb3VRR0FXaSJ9LHsicm9sZSI6InJlYWQ6YnVzaW5lc3MiLCJyZXNvdXJjZV9pZCI6ImJpel8zYmg2OWJxMXJrM2RtWE5vQUtWb251In1dLCJleHAiOjE3MTE1NTk0MTQsImlhdCI6MTcwMzc4MzQxNCwicGxhdGZvcm1fYWNjb3VudF9pZCI6ImFjY18zcmVOYjRhTll5MmlXRFpRVmN6bXg0In0.oPOoDYxzrnpE8PRUaz-FCU4KqnSuNbFTeDkl3AtMscjUkIctP1OIFh-ZGBjbH5eVH5noXCbaiin0j92dS7jx4gLpxuYT2Q8gpZbuIsT7fa58elvGeRkUUJ-AC5ueZxlv90yPWMm0OIbyrV7XZhuwYyKbV-ZczEbl2JpvBMe40CM-LdClQV66d_-Kw9a23SabBVfYgP5V-5OsagOIESvzZoO-27tGlNkV2a-hxqddDCOZv0HvRYAtp5S7EQrmRdEBu5gCNbf1eRFG424hxZUFVr2LdetYuKQLxJjDdUjf86ZwEUecrEaDSupiN1VC3CitdOwBVf6-R_N0VpN4VLVD5g',
|
|
5
|
+
exampleAccountId: 'acc_5Et9iXrSSAZR2KSouQGAWi',
|
|
6
|
+
exampleBusinessId: 'biz_3bh69bq1rk3dmXNoAKVonu',
|
|
7
|
+
examplePaymentId: 'py_1NNeEnf4FbelxDCQN2RHcE',
|
|
8
|
+
examplePayoutId: 'po_17745yESnHyEgWNeunmhmR',
|
|
9
|
+
privateApiOrigin: '',
|
|
10
|
+
privateAuthToken: '',
|
|
11
|
+
};
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-09-
|
|
2
|
+
"timestamp": "2024-09-23T16:26:29",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.19.2",
|
|
@@ -3040,7 +3040,7 @@
|
|
|
3040
3040
|
"reflectToAttr": false,
|
|
3041
3041
|
"docs": "URL for the rendered iFrame. End-users need not use this.",
|
|
3042
3042
|
"docsTags": [],
|
|
3043
|
-
"default": "
|
|
3043
|
+
"default": "config.iframeOrigin",
|
|
3044
3044
|
"values": [
|
|
3045
3045
|
{
|
|
3046
3046
|
"type": "string"
|
|
@@ -6281,7 +6281,7 @@
|
|
|
6281
6281
|
"reflectToAttr": false,
|
|
6282
6282
|
"docs": "URL for the rendered iFrame. End-users need not use this.",
|
|
6283
6283
|
"docsTags": [],
|
|
6284
|
-
"default": "
|
|
6284
|
+
"default": "config.iframeOrigin",
|
|
6285
6285
|
"values": [
|
|
6286
6286
|
{
|
|
6287
6287
|
"type": "string"
|
|
@@ -7035,7 +7035,7 @@
|
|
|
7035
7035
|
"reflectToAttr": false,
|
|
7036
7036
|
"docs": "URL for the rendered iFrame. End-users need not use this.",
|
|
7037
7037
|
"docsTags": [],
|
|
7038
|
-
"default": "
|
|
7038
|
+
"default": "config.iframeOrigin",
|
|
7039
7039
|
"values": [
|
|
7040
7040
|
{
|
|
7041
7041
|
"type": "string"
|
|
@@ -7961,7 +7961,7 @@
|
|
|
7961
7961
|
"reflectToAttr": false,
|
|
7962
7962
|
"docs": "",
|
|
7963
7963
|
"docsTags": [],
|
|
7964
|
-
"default": "
|
|
7964
|
+
"default": "config.iframeOrigin",
|
|
7965
7965
|
"values": [
|
|
7966
7966
|
{
|
|
7967
7967
|
"type": "string"
|
|
@@ -9370,7 +9370,7 @@
|
|
|
9370
9370
|
"reflectToAttr": false,
|
|
9371
9371
|
"docs": "",
|
|
9372
9372
|
"docsTags": [],
|
|
9373
|
-
"default": "
|
|
9373
|
+
"default": "config.iframeOrigin",
|
|
9374
9374
|
"values": [
|
|
9375
9375
|
{
|
|
9376
9376
|
"type": "string"
|
|
@@ -11524,7 +11524,7 @@
|
|
|
11524
11524
|
"reflectToAttr": false,
|
|
11525
11525
|
"docs": "",
|
|
11526
11526
|
"docsTags": [],
|
|
11527
|
-
"default": "
|
|
11527
|
+
"default": "config.iframeOrigin",
|
|
11528
11528
|
"values": [
|
|
11529
11529
|
{
|
|
11530
11530
|
"type": "string"
|
|
@@ -12466,7 +12466,7 @@
|
|
|
12466
12466
|
"reflectToAttr": false,
|
|
12467
12467
|
"docs": "",
|
|
12468
12468
|
"docsTags": [],
|
|
12469
|
-
"default": "
|
|
12469
|
+
"default": "config.iframeOrigin",
|
|
12470
12470
|
"values": [
|
|
12471
12471
|
{
|
|
12472
12472
|
"type": "string"
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { p as packageJson } from './package-
|
|
1
|
+
import { p as packageJson } from './package-d88677e9.js';
|
|
2
|
+
import { c as config } from './config-476c7241.js';
|
|
2
3
|
import { A as Api } from './Api-b09a2f6a.js';
|
|
3
4
|
|
|
4
5
|
class AnalyticsService {
|
|
5
6
|
async record(body) {
|
|
6
7
|
const endpoint = 'analytics';
|
|
7
|
-
return Api({ apiOrigin:
|
|
8
|
+
return Api({ apiOrigin: config.proxyApiOrigin }).post(endpoint, JSON.stringify(body));
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as create$3 } from './index.esm-fc4f5c0c.js';
|
|
2
|
-
import { h as businessNameValidation, w as websiteUrlValidation, e as emailValidation, d as phoneValidation, j as doingBusinessAsValidation, k as businessClassificationValidation, m as industryValidation, t as taxIdValidation, n as dateOfIncorporationValidation, r as revenueValidation, o as paymentVolumeValidation, q as whenServiceReceivedValidation, u as recurringPaymentsValidation, v as recurringPaymentsPercentageValidation, x as seasonalBusinessValidation, y as otherPaymentDetailsValidation } from './schema-validations-
|
|
2
|
+
import { h as businessNameValidation, w as websiteUrlValidation, e as emailValidation, d as phoneValidation, j as doingBusinessAsValidation, k as businessClassificationValidation, m as industryValidation, t as taxIdValidation, n as dateOfIncorporationValidation, r as revenueValidation, o as paymentVolumeValidation, q as whenServiceReceivedValidation, u as recurringPaymentsValidation, v as recurringPaymentsPercentageValidation, x as seasonalBusinessValidation, y as otherPaymentDetailsValidation } from './schema-validations-2f4fdebb.js';
|
|
3
3
|
|
|
4
4
|
const businessCoreInfoSchema = (allowOptionalFields) => {
|
|
5
5
|
const schema = create$3({
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
+
import { c as config } from './config-476c7241.js';
|
|
1
2
|
import { A as Api } from './Api-b09a2f6a.js';
|
|
2
3
|
|
|
3
4
|
class BusinessService {
|
|
4
5
|
async fetchBusiness(businessId, authToken) {
|
|
5
6
|
const endpoint = `entities/business/${businessId}`;
|
|
6
|
-
return Api({ authToken, apiOrigin:
|
|
7
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).get(endpoint);
|
|
7
8
|
}
|
|
8
9
|
async patchBusiness(authToken, businessId, payload) {
|
|
9
10
|
const endpoint = `entities/business/${businessId}`;
|
|
10
|
-
return Api({ authToken, apiOrigin:
|
|
11
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).patch(endpoint, payload);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
class IdentityService {
|
|
14
15
|
async fetchIdentity(identityId, authToken) {
|
|
15
16
|
const endpoint = `entities/identity/${identityId}`;
|
|
16
|
-
return Api({ authToken, apiOrigin:
|
|
17
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).get(endpoint);
|
|
17
18
|
}
|
|
18
19
|
async patchIdentity(authToken, identityId, payload) {
|
|
19
20
|
const endpoint = `entities/identity/${identityId}`;
|
|
20
|
-
return Api({ authToken, apiOrigin:
|
|
21
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).patch(endpoint, payload);
|
|
21
22
|
}
|
|
22
23
|
async postIdentity(authToken, payload) {
|
|
23
24
|
const endpoint = `entities/identity`;
|
|
24
|
-
return Api({ authToken, apiOrigin:
|
|
25
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).post(endpoint, payload);
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const config = {
|
|
2
|
+
iframeOrigin: 'https://js.justifi.ai/v2',
|
|
3
|
+
proxyApiOrigin: 'https://wc-proxy.justifi.ai',
|
|
4
|
+
proxyAuthToken: 'eyJraWQiOiJqdXN0aWZpLWUyNDgyMmU3ODE1MmEzZjRkMjU1IiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJodHRwczovL2F1dGguanVzdGlmaS5haS8iLCJhenAiOiJvYXNfMmlsWHBqOHQ2WVlEQ0xWU0FiVFczMiIsInN1YiI6Im9hc18yaWxYcGo4dDZZWURDTFZTQWJUVzMyQHNlc3Npb25zIiwiYXVkIjoiaHR0cHM6Ly9hcGkuanVzdGlmaS5haS92MSIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyIsInBlcm1pc3Npb25zIjpbeyJyb2xlIjoicmVhZDphY2NvdW50IiwicmVzb3VyY2VfaWQiOiJhY2NfNUV0OWlYclNTQVpSMktTb3VRR0FXaSJ9LHsicm9sZSI6InJlYWQ6YnVzaW5lc3MiLCJyZXNvdXJjZV9pZCI6ImJpel8zYmg2OWJxMXJrM2RtWE5vQUtWb251In1dLCJleHAiOjE3MTE1NTk0MTQsImlhdCI6MTcwMzc4MzQxNCwicGxhdGZvcm1fYWNjb3VudF9pZCI6ImFjY18zcmVOYjRhTll5MmlXRFpRVmN6bXg0In0.oPOoDYxzrnpE8PRUaz-FCU4KqnSuNbFTeDkl3AtMscjUkIctP1OIFh-ZGBjbH5eVH5noXCbaiin0j92dS7jx4gLpxuYT2Q8gpZbuIsT7fa58elvGeRkUUJ-AC5ueZxlv90yPWMm0OIbyrV7XZhuwYyKbV-ZczEbl2JpvBMe40CM-LdClQV66d_-Kw9a23SabBVfYgP5V-5OsagOIESvzZoO-27tGlNkV2a-hxqddDCOZv0HvRYAtp5S7EQrmRdEBu5gCNbf1eRFG424hxZUFVr2LdetYuKQLxJjDdUjf86ZwEUecrEaDSupiN1VC3CitdOwBVf6-R_N0VpN4VLVD5g',
|
|
5
|
+
exampleAccountId: 'acc_5Et9iXrSSAZR2KSouQGAWi',
|
|
6
|
+
exampleBusinessId: 'biz_3bh69bq1rk3dmXNoAKVonu',
|
|
7
|
+
examplePaymentId: 'py_1NNeEnf4FbelxDCQN2RHcE',
|
|
8
|
+
examplePayoutId: 'po_17745yESnHyEgWNeunmhmR',
|
|
9
|
+
privateApiOrigin: '',
|
|
10
|
+
privateAuthToken: '',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { config as c };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-57431c24.js';
|
|
2
|
-
import { a as businessServiceReceivedOptions, r as recurringPaymentsOptions, s as seasonalBusinessOptions, b as businessClassificationOptions } from './business-form-options-
|
|
2
|
+
import { a as businessServiceReceivedOptions, r as recurringPaymentsOptions, s as seasonalBusinessOptions, b as businessClassificationOptions } from './business-form-options-0b08e08c.js';
|
|
3
3
|
import { C as CURRENCY_MASK, T as TAX_ID_MASKS, P as PHONE_MASKS, S as SSN_MASK } from './form-input-masks-0e18300f.js';
|
|
4
4
|
import { C as CoreBusinessInfo } from './Business-e218b4f4.js';
|
|
5
5
|
import { d as deconstructDate } from './helpers-96ea3464.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-57431c24.js';
|
|
2
|
-
import { a as additionalQuestionsSchema, b as businessCoreInfoSchema } from './business-additional-questions-schema-
|
|
2
|
+
import { a as additionalQuestionsSchema, b as businessCoreInfoSchema } from './business-additional-questions-schema-e39bc781.js';
|
|
3
3
|
import { F as FormController } from './index.esm-fc4f5c0c.js';
|
|
4
4
|
import { A as AdditionalQuestions, C as CoreBusinessInfo, R as Representative, b as Address } from './Business-e218b4f4.js';
|
|
5
5
|
import { C as CURRENCY_MASK, P as PHONE_MASKS } from './form-input-masks-0e18300f.js';
|
|
6
|
-
import { a as businessServiceReceivedOptions, r as recurringPaymentsOptions, s as seasonalBusinessOptions, b as businessClassificationOptions } from './business-form-options-
|
|
7
|
-
import { b as parseCoreInfo, c as parseIdentityInfo, i as identitySchema, d as parseAddressInfo, a as addressSchema } from './payload-parsers-
|
|
6
|
+
import { a as businessServiceReceivedOptions, r as recurringPaymentsOptions, s as seasonalBusinessOptions, b as businessClassificationOptions } from './business-form-options-0b08e08c.js';
|
|
7
|
+
import { b as parseCoreInfo, c as parseIdentityInfo, i as identitySchema, d as parseAddressInfo, a as addressSchema } from './payload-parsers-62f443e1.js';
|
|
8
8
|
import { h as flattenNestedObject, j as isInRange, s as snakeCaseToHumanReadable, b as formatDate, k as formatTimeSeconds } from './utils-3c1dd2fa.js';
|
|
9
9
|
import { n as numberOnlyHandler } from './utils-3bb6347a.js';
|
|
10
|
-
import { N as EntityDocumentType } from './schema-validations-
|
|
10
|
+
import { N as EntityDocumentType } from './schema-validations-2f4fdebb.js';
|
|
11
11
|
import { b as BusinessFormStep, a as BusinessFormClickActions } from './business-form-types-1bc5fe08.js';
|
|
12
12
|
import { B as Button } from './button-34e75e0f.js';
|
|
13
13
|
import { S as StateOptions } from './state-options-a356fb11.js';
|
|
@@ -2,22 +2,23 @@ import { A as Api } from './Api-b09a2f6a.js';
|
|
|
2
2
|
import './Pagination-afc8f96d.js';
|
|
3
3
|
import './Payment-6bf26fe2.js';
|
|
4
4
|
import './Payout-dfe15b00.js';
|
|
5
|
+
import { c as config } from './config-476c7241.js';
|
|
5
6
|
import { C as ComponentErrorSeverity } from './ComponentError-3ce7f437.js';
|
|
6
7
|
import { g as getErrorMessage, a as getErrorCode } from './utils-b10dae27.js';
|
|
7
8
|
|
|
8
9
|
class PayoutService {
|
|
9
10
|
async fetchPayouts(accountId, authToken, params) {
|
|
10
|
-
const api = Api({ authToken, apiOrigin:
|
|
11
|
+
const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
|
|
11
12
|
const endpoint = `account/${accountId}/payouts`;
|
|
12
13
|
return api.get(endpoint, params);
|
|
13
14
|
}
|
|
14
15
|
async fetchPayout(payoutId, authToken) {
|
|
15
|
-
const api = Api({ authToken, apiOrigin:
|
|
16
|
+
const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
|
|
16
17
|
const endpoint = `payouts/${payoutId}`;
|
|
17
18
|
return api.get(endpoint);
|
|
18
19
|
}
|
|
19
20
|
async fetchCSV(payoutId, authToken) {
|
|
20
|
-
const api = Api({ authToken, apiOrigin:
|
|
21
|
+
const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
|
|
21
22
|
const endpoint = `reports/payouts/${payoutId}`;
|
|
22
23
|
return api.get(endpoint);
|
|
23
24
|
}
|