@justifi/webcomponents 6.5.1-rc.2 → 6.5.1-rc.3
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/{GooglePay-HXBAmTgL.js → GooglePay-40aEKdDF.js} +40 -9
- package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +1 -1
- package/dist/cjs/{business.service-DMzf08nC.js → business.service-BggHdPOV.js} +1 -1
- package/dist/cjs/{check-pkg-version-Bw6Rz_E3.js → check-pkg-version-DuPkU5qI.js} +2 -2
- package/dist/cjs/{checkout.service-CHNHEsrp.js → checkout.service-BUcIs9az.js} +1 -1
- package/dist/cjs/checkouts-list-core.cjs.entry.js +1 -1
- package/dist/cjs/{dispute.service-B63kcFkU.js → dispute.service-CxWqivLc.js} +1 -1
- package/dist/cjs/{get-payment-details-BN139jp0.js → get-payment-details-D_dDxsPG.js} +1 -1
- package/dist/cjs/{get-subaccounts-IgHJX5J4.js → get-subaccounts-_D9lzD5O.js} +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
- package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +3 -3
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +1 -1
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +2 -2
- package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +241 -16
- package/dist/cjs/justifi-business-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +4 -4
- package/dist/cjs/justifi-checkout.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +4 -4
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +4 -4
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -3
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +5 -5
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +5 -5
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +5 -5
- package/dist/cjs/{package--UMqvxMQ.js → package-C6nOTkVV.js} +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-eOZc1Qay.js → payment.service-wWZTmyFv.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
- package/dist/cjs/{payout.service-QVl5N-UV.js → payout.service-CWAem5VG.js} +1 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +2 -2
- package/dist/cjs/{terminal-orders-table-g2fwrh2P.js → terminal-orders-table-DBNG4K5I.js} +1 -1
- package/dist/cjs/{terminal.service-BuSFyt0j.js → terminal.service-DSlqCGxE.js} +1 -1
- package/dist/cjs/terminals-list-core.cjs.entry.js +1 -1
- package/dist/collection/api/GooglePay.js +40 -9
- package/dist/collection/api/services/google-pay.service.js +137 -9
- package/dist/collection/components/modular-checkout/sub-components/google-pay.js +100 -3
- package/dist/docs.json +1 -1
- package/dist/esm/{GooglePay-9bPcqGZ9.js → GooglePay-f7mYX17c.js} +40 -9
- package/dist/esm/bank-account-document-form-inputs_6.entry.js +1 -1
- package/dist/esm/{business.service-2j91Emgq.js → business.service-CzHfftZk.js} +1 -1
- package/dist/esm/{check-pkg-version-2BU_KPHv.js → check-pkg-version-Cqb7EhvC.js} +2 -2
- package/dist/esm/{checkout.service-D-dEMyXF.js → checkout.service-BWdnJLVG.js} +1 -1
- package/dist/esm/checkouts-list-core.entry.js +1 -1
- package/dist/esm/{dispute.service-DPumDIuV.js → dispute.service-CqX5HR5o.js} +1 -1
- package/dist/esm/{get-payment-details-CD_K6FQ3.js → get-payment-details-D0T7bd_-.js} +1 -1
- package/dist/esm/{get-subaccounts-D1eF6c0B.js → get-subaccounts-Gil-SOoF.js} +1 -1
- package/dist/esm/hidden-input_2.entry.js +1 -1
- package/dist/esm/internal-tokenize-payment-method_7.entry.js +3 -3
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +1 -1
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +2 -2
- package/dist/esm/justifi-apple-pay_8.entry.js +241 -16
- package/dist/esm/justifi-business-details.entry.js +4 -4
- package/dist/esm/justifi-business-form.entry.js +4 -4
- package/dist/esm/justifi-checkout.entry.js +3 -3
- package/dist/esm/justifi-checkouts-list-filters.entry.js +1 -1
- package/dist/esm/justifi-checkouts-list.entry.js +5 -5
- package/dist/esm/justifi-dispute-management.entry.js +4 -4
- package/dist/esm/justifi-dispute-notification_3.entry.js +4 -4
- package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
- package/dist/esm/justifi-order-terminals.entry.js +5 -5
- package/dist/esm/justifi-owner-form_3.entry.js +2 -2
- package/dist/esm/justifi-payment-details.entry.js +5 -5
- package/dist/esm/justifi-payment-provisioning.entry.js +4 -4
- package/dist/esm/justifi-payment-transactions-list.entry.js +4 -4
- package/dist/esm/justifi-payments-list.entry.js +4 -4
- package/dist/esm/justifi-payout-details.entry.js +4 -4
- package/dist/esm/justifi-payout-transactions-list.entry.js +4 -4
- package/dist/esm/justifi-payouts-list.entry.js +5 -5
- package/dist/esm/justifi-refund-payment.entry.js +5 -5
- package/dist/esm/justifi-season-interruption-insurance.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list.entry.js +4 -4
- package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
- package/dist/esm/justifi-terminals-list.entry.js +5 -5
- package/dist/esm/{package-Bx3wyDU2.js → package-CzedYX3W.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +1 -1
- package/dist/esm/{payment.service-BreQSu6J.js → payment.service-CWyZF34P.js} +1 -1
- package/dist/esm/payments-list-core.entry.js +1 -1
- package/dist/esm/{payout.service-DuqRe6oq.js → payout.service-CkTievFG.js} +1 -1
- package/dist/esm/payouts-list-core.entry.js +1 -1
- package/dist/esm/terminal-orders-list-core.entry.js +2 -2
- package/dist/esm/{terminal-orders-table-DSo5x2D7.js → terminal-orders-table-OX3ZvzZy.js} +1 -1
- package/dist/esm/{terminal.service-CkzrYIA_.js → terminal.service-Bu5-dhum.js} +1 -1
- package/dist/esm/terminals-list-core.entry.js +1 -1
- package/dist/module/GooglePay.js +40 -9
- package/dist/module/google-pay.js +237 -12
- package/dist/module/package.js +1 -1
- package/dist/types/api/services/google-pay.service.d.ts +1 -1
- package/dist/webcomponents/{p-d2935214.entry.js → p-0437c330.entry.js} +1 -1
- package/dist/webcomponents/{p-16812327.entry.js → p-065b24c3.entry.js} +1 -1
- package/dist/webcomponents/{p-9a795f44.entry.js → p-14cbf366.entry.js} +1 -1
- package/dist/webcomponents/{p-3c006a15.entry.js → p-1e014ee7.entry.js} +1 -1
- package/dist/webcomponents/{p-ee122560.entry.js → p-20e66fc0.entry.js} +1 -1
- package/dist/webcomponents/{p-04154136.entry.js → p-22fdf7a4.entry.js} +1 -1
- package/dist/webcomponents/{p-d88d228f.entry.js → p-25755af4.entry.js} +1 -1
- package/dist/webcomponents/{p-38e1ef4b.entry.js → p-3d3a65ca.entry.js} +1 -1
- package/dist/webcomponents/p-3f291e6b.entry.js +1 -0
- package/dist/webcomponents/{p-5cba8448.entry.js → p-44011a41.entry.js} +1 -1
- package/dist/webcomponents/{p-88f58abe.entry.js → p-4ccd753b.entry.js} +1 -1
- package/dist/webcomponents/{p-03930216.entry.js → p-4f16a3ce.entry.js} +1 -1
- package/dist/webcomponents/{p-a87187c3.entry.js → p-50a32503.entry.js} +1 -1
- package/dist/webcomponents/{p-06ce1202.entry.js → p-57ed105e.entry.js} +1 -1
- package/dist/webcomponents/{p-b3f8d5d4.entry.js → p-5e3bc1dc.entry.js} +1 -1
- package/dist/webcomponents/{p-7bf6ded7.entry.js → p-62cfe9b6.entry.js} +1 -1
- package/dist/webcomponents/p-6a075da4.entry.js +1 -0
- package/dist/webcomponents/{p-b8426810.entry.js → p-88074dd7.entry.js} +1 -1
- package/dist/webcomponents/{p-7dbd0618.entry.js → p-8c16e4aa.entry.js} +1 -1
- package/dist/webcomponents/{p-404b3f02.entry.js → p-8ee61443.entry.js} +1 -1
- package/dist/webcomponents/{p-c88babbe.entry.js → p-8efea1e4.entry.js} +1 -1
- package/dist/webcomponents/p-A2FbmAEt.js +1 -0
- package/dist/webcomponents/{p-Dy5btfGV.js → p-B4W3my_D.js} +1 -1
- package/dist/webcomponents/{p-CQrwlULd.js → p-BrazW3nF.js} +1 -1
- package/dist/webcomponents/{p-BN1PYSFf.js → p-CIOILVyM.js} +1 -1
- package/dist/webcomponents/{p-BKM7YeAB.js → p-CPRPR6fJ.js} +1 -1
- package/dist/webcomponents/p-CzedYX3W.js +1 -0
- package/dist/webcomponents/{p-CVhnuewz.js → p-DUs94fK3.js} +1 -1
- package/dist/webcomponents/{p-C01zp4xw.js → p-DXnwIxTB.js} +1 -1
- package/dist/webcomponents/{p-t8p0WAW4.js → p-DeX_cIoV.js} +1 -1
- package/dist/webcomponents/{p-Cmb6PRFh.js → p-TKWqvm_A.js} +1 -1
- package/dist/webcomponents/{p-BxtmTjqW.js → p-Yp5v6wmS.js} +1 -1
- package/dist/webcomponents/{p-BVwVhXcQ.js → p-aZ8YkDMZ.js} +1 -1
- package/dist/webcomponents/{p-8f4adcfd.entry.js → p-aa42e3c1.entry.js} +1 -1
- package/dist/webcomponents/{p-ba0762f9.entry.js → p-ad0f8d85.entry.js} +1 -1
- package/dist/webcomponents/{p-7b610d9e.entry.js → p-b8c47cb1.entry.js} +1 -1
- package/dist/webcomponents/p-c11e6c03.entry.js +1 -0
- package/dist/webcomponents/{p-a9f75a9e.entry.js → p-c5af7149.entry.js} +1 -1
- package/dist/webcomponents/{p-13bdb5ed.entry.js → p-c7df4370.entry.js} +1 -1
- package/dist/webcomponents/p-cf9d8e1a.entry.js +1 -0
- package/dist/webcomponents/{p-0cd1c683.entry.js → p-d3663663.entry.js} +1 -1
- package/dist/webcomponents/{p-47f6d271.entry.js → p-daedfe82.entry.js} +1 -1
- package/dist/webcomponents/{p-9370cf0d.entry.js → p-dd11e67b.entry.js} +1 -1
- package/dist/webcomponents/{p-9065d67e.entry.js → p-e3ab5fe2.entry.js} +1 -1
- package/dist/webcomponents/{p-0412f491.entry.js → p-e95e27af.entry.js} +1 -1
- package/dist/webcomponents/{p-c63b0271.entry.js → p-f66778b8.entry.js} +1 -1
- package/dist/webcomponents/{p-1d04bd7a.entry.js → p-ff212635.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-42658888.entry.js +0 -1
- package/dist/webcomponents/p-43390a7f.entry.js +0 -1
- package/dist/webcomponents/p-BRbk6oSh.js +0 -1
- package/dist/webcomponents/p-Bx3wyDU2.js +0 -1
- package/dist/webcomponents/p-a0c9f0bd.entry.js +0 -1
- package/dist/webcomponents/p-e9d13cca.entry.js +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-BhI7cJcE.js');
|
|
4
4
|
var Api = require('./Api-BeSnjEuW.js');
|
|
5
|
-
var GooglePay$1 = require('./GooglePay-
|
|
5
|
+
var GooglePay$1 = require('./GooglePay-40aEKdDF.js');
|
|
6
6
|
var styledHost = require('./styled-host-D5g7INLE.js');
|
|
7
7
|
require('./event-types-YOY5TKUN.js');
|
|
8
8
|
var skeleton = require('./skeleton-BF3HGL9X.js');
|
|
@@ -12,7 +12,7 @@ var index$1 = require('./index-CajjbB9t.js');
|
|
|
12
12
|
var header1 = require('./header-1-CBO8uDuZ.js');
|
|
13
13
|
var insuranceState = require('./insurance-state-BMHITXoD.js');
|
|
14
14
|
var header3 = require('./header-3-CPWtI1t0.js');
|
|
15
|
-
var checkPkgVersion = require('./check-pkg-version-
|
|
15
|
+
var checkPkgVersion = require('./check-pkg-version-DuPkU5qI.js');
|
|
16
16
|
require('./config-state-CYoBVAca.js');
|
|
17
17
|
require('./dinero-BwNN_k7x.js');
|
|
18
18
|
var ComponentError = require('./ComponentError-D4OLnOkg.js');
|
|
@@ -20,10 +20,10 @@ require('./Pagination-Dediz133.js');
|
|
|
20
20
|
require('./Business-DWHy_-z9.js');
|
|
21
21
|
require('./Dispute-CruQTF6_.js');
|
|
22
22
|
var utils$1 = require('./utils-DvUQQLmR.js');
|
|
23
|
-
var checkout_service = require('./checkout.service-
|
|
23
|
+
var checkout_service = require('./checkout.service-BUcIs9az.js');
|
|
24
24
|
var paymentMethodOptionUtils = require('./payment-method-option-utils-WYHIHy-l.js');
|
|
25
25
|
require('./index-mmd0OhmD.js');
|
|
26
|
-
require('./package
|
|
26
|
+
require('./package-C6nOTkVV.js');
|
|
27
27
|
|
|
28
28
|
// Centralized error codes for Apple Pay service
|
|
29
29
|
var ApplePayServiceErrorCode;
|
|
@@ -717,22 +717,44 @@ class GooglePayService {
|
|
|
717
717
|
* Initialize Google Pay configuration
|
|
718
718
|
*/
|
|
719
719
|
initialize(googlePayConfig) {
|
|
720
|
+
console.log('[GooglePayService] initialize: Starting initialization', {
|
|
721
|
+
config: googlePayConfig,
|
|
722
|
+
});
|
|
720
723
|
this.googlePayConfig = new GooglePay$1.GooglePayConfig(googlePayConfig);
|
|
724
|
+
console.log('[GooglePayService] initialize: Config object created', {
|
|
725
|
+
isValid: this.googlePayConfig.isValid,
|
|
726
|
+
environment: this.googlePayConfig.environment,
|
|
727
|
+
merchantId: this.googlePayConfig.merchantId,
|
|
728
|
+
});
|
|
721
729
|
if (!this.googlePayConfig.isValid) {
|
|
730
|
+
console.error('[GooglePayService] initialize: Invalid configuration');
|
|
722
731
|
throw new Error('Invalid Google Pay configuration provided');
|
|
723
732
|
}
|
|
724
733
|
// Create Google Pay client
|
|
734
|
+
console.log('[GooglePayService] initialize: Creating Google Pay client', {
|
|
735
|
+
environment: this.googlePayConfig.environment,
|
|
736
|
+
});
|
|
725
737
|
this.googlePayClient = GooglePay$1.GooglePayHelpers.createGooglePayClient(this.googlePayConfig.environment);
|
|
726
738
|
if (!this.googlePayClient) {
|
|
739
|
+
console.error('[GooglePayService] initialize: Failed to create client');
|
|
727
740
|
throw new Error('Failed to create Google Pay client');
|
|
728
741
|
}
|
|
729
|
-
|
|
742
|
+
console.log('[GooglePayService] initialize: Client created successfully', {
|
|
743
|
+
hasClient: !!this.googlePayClient,
|
|
744
|
+
});
|
|
730
745
|
}
|
|
731
746
|
/**
|
|
732
747
|
* Process Google Pay payment via API
|
|
733
748
|
*/
|
|
734
749
|
async processPayment(authToken, accountId, payload) {
|
|
750
|
+
var _a;
|
|
735
751
|
const endpoint = PROCESS_TOKEN_ENDPOINT;
|
|
752
|
+
console.log('[GooglePayService] processPayment: Starting', {
|
|
753
|
+
endpoint,
|
|
754
|
+
hasAuthToken: !!authToken,
|
|
755
|
+
accountId,
|
|
756
|
+
payload,
|
|
757
|
+
});
|
|
736
758
|
try {
|
|
737
759
|
const result = await this.api.post({
|
|
738
760
|
endpoint,
|
|
@@ -742,12 +764,20 @@ class GooglePayService {
|
|
|
742
764
|
'sub-account': accountId,
|
|
743
765
|
},
|
|
744
766
|
});
|
|
767
|
+
console.log('[GooglePayService] processPayment: API response received', {
|
|
768
|
+
hasId: !!result.id,
|
|
769
|
+
hasToken: !!((_a = result.data) === null || _a === void 0 ? void 0 : _a.token),
|
|
770
|
+
result,
|
|
771
|
+
});
|
|
772
|
+
const success = result.id && !!result.data.token;
|
|
773
|
+
console.log('[GooglePayService] processPayment: Result', { success });
|
|
745
774
|
return {
|
|
746
|
-
success
|
|
775
|
+
success,
|
|
747
776
|
data: result,
|
|
748
777
|
};
|
|
749
778
|
}
|
|
750
|
-
catch (
|
|
779
|
+
catch (error) {
|
|
780
|
+
console.error('[GooglePayService] processPayment: API error', error);
|
|
751
781
|
throw new Error('Google Pay payment processing failed');
|
|
752
782
|
}
|
|
753
783
|
}
|
|
@@ -755,21 +785,42 @@ class GooglePayService {
|
|
|
755
785
|
* Check if Google Pay is available on this device/browser
|
|
756
786
|
*/
|
|
757
787
|
isAvailable() {
|
|
758
|
-
|
|
788
|
+
const isSupported = GooglePay$1.GooglePayHelpers.isGooglePaySupported();
|
|
789
|
+
const hasClient = !!this.googlePayClient;
|
|
790
|
+
const result = isSupported && hasClient;
|
|
791
|
+
console.log('[GooglePayService] isAvailable:', {
|
|
792
|
+
isSupported,
|
|
793
|
+
hasClient,
|
|
794
|
+
result,
|
|
795
|
+
});
|
|
796
|
+
return result;
|
|
759
797
|
}
|
|
760
798
|
/**
|
|
761
799
|
* Check if the user can make payments with Google Pay
|
|
762
800
|
*/
|
|
763
801
|
async canMakePayments() {
|
|
802
|
+
console.log('[GooglePayService] canMakePayments: Checking', {
|
|
803
|
+
hasClient: !!this.googlePayClient,
|
|
804
|
+
hasConfig: !!this.googlePayConfig,
|
|
805
|
+
});
|
|
764
806
|
if (!this.googlePayClient || !this.googlePayConfig) {
|
|
807
|
+
console.warn('[GooglePayService] canMakePayments: Missing client or config');
|
|
765
808
|
return false;
|
|
766
809
|
}
|
|
767
810
|
try {
|
|
768
811
|
const baseRequest = GooglePay$1.GooglePayHelpers.createBasePaymentDataRequest();
|
|
812
|
+
console.log('[GooglePayService] canMakePayments: Calling isReadyToPay', {
|
|
813
|
+
baseRequest,
|
|
814
|
+
});
|
|
769
815
|
const response = await this.googlePayClient.isReadyToPay(baseRequest);
|
|
816
|
+
console.log('[GooglePayService] canMakePayments: Response received', {
|
|
817
|
+
result: response.result,
|
|
818
|
+
response,
|
|
819
|
+
});
|
|
770
820
|
return response.result;
|
|
771
821
|
}
|
|
772
|
-
catch (
|
|
822
|
+
catch (error) {
|
|
823
|
+
console.error('[GooglePayService] canMakePayments: Error', error);
|
|
773
824
|
return false;
|
|
774
825
|
}
|
|
775
826
|
}
|
|
@@ -778,27 +829,53 @@ class GooglePayService {
|
|
|
778
829
|
*/
|
|
779
830
|
async startPaymentSession(paymentDataRequest, authToken, accountId) {
|
|
780
831
|
var _a;
|
|
832
|
+
console.log('[GooglePayService] startPaymentSession: Starting', {
|
|
833
|
+
hasConfig: !!this.googlePayConfig,
|
|
834
|
+
hasClient: !!this.googlePayClient,
|
|
835
|
+
hasAuthToken: !!authToken,
|
|
836
|
+
accountId,
|
|
837
|
+
paymentDataRequest,
|
|
838
|
+
});
|
|
781
839
|
if (!this.googlePayConfig || !this.googlePayClient) {
|
|
840
|
+
console.error('[GooglePayService] startPaymentSession: Not initialized');
|
|
782
841
|
throw new Error('Google Pay not initialized. Call initialize() first.');
|
|
783
842
|
}
|
|
784
843
|
if (!this.isAvailable()) {
|
|
844
|
+
console.error('[GooglePayService] startPaymentSession: Not available');
|
|
785
845
|
throw new Error('Google Pay is not available on this device/browser');
|
|
786
846
|
}
|
|
787
847
|
const request = new GooglePay$1.GooglePayPaymentDataRequest(paymentDataRequest);
|
|
848
|
+
console.log('[GooglePayService] startPaymentSession: Request object created', {
|
|
849
|
+
isValid: request.isValid,
|
|
850
|
+
request,
|
|
851
|
+
});
|
|
788
852
|
if (!request.isValid) {
|
|
853
|
+
console.error('[GooglePayService] startPaymentSession: Invalid request');
|
|
789
854
|
throw new Error('Invalid payment data request provided');
|
|
790
855
|
}
|
|
791
856
|
try {
|
|
857
|
+
console.log('[GooglePayService] startPaymentSession: Loading payment data...');
|
|
792
858
|
const paymentData = await this.googlePayClient.loadPaymentData(request);
|
|
859
|
+
console.log('[GooglePayService] startPaymentSession: Payment data loaded', {
|
|
860
|
+
hasPaymentData: !!paymentData,
|
|
861
|
+
paymentMethodData: paymentData === null || paymentData === void 0 ? void 0 : paymentData.paymentMethodData,
|
|
862
|
+
});
|
|
793
863
|
// Build top-level snake_case fields from Google Pay tokenizationData
|
|
794
864
|
const tokenizationData = (_a = paymentData === null || paymentData === void 0 ? void 0 : paymentData.paymentMethodData) === null || _a === void 0 ? void 0 : _a.tokenizationData;
|
|
865
|
+
console.log('[GooglePayService] startPaymentSession: Extracted tokenization data', {
|
|
866
|
+
hasTokenizationData: !!tokenizationData,
|
|
867
|
+
tokenizationData,
|
|
868
|
+
});
|
|
795
869
|
const tokenObj = (() => {
|
|
796
870
|
if ((tokenizationData === null || tokenizationData === void 0 ? void 0 : tokenizationData.token) &&
|
|
797
871
|
typeof tokenizationData.token === 'string') {
|
|
798
872
|
try {
|
|
799
|
-
|
|
873
|
+
const parsed = JSON.parse(tokenizationData.token);
|
|
874
|
+
console.log('[GooglePayService] startPaymentSession: Parsed token', parsed);
|
|
875
|
+
return parsed;
|
|
800
876
|
}
|
|
801
877
|
catch (_e) {
|
|
878
|
+
console.warn('[GooglePayService] startPaymentSession: Failed to parse token, using raw', _e);
|
|
802
879
|
return tokenizationData;
|
|
803
880
|
}
|
|
804
881
|
}
|
|
@@ -815,8 +892,19 @@ class GooglePayService {
|
|
|
815
892
|
: undefined,
|
|
816
893
|
signedMessage: tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.signedMessage,
|
|
817
894
|
};
|
|
895
|
+
console.log('[GooglePayService] startPaymentSession: Token process request created', {
|
|
896
|
+
hasProtocolVersion: !!tokenProcessRequest.protocolVersion,
|
|
897
|
+
hasSignature: !!tokenProcessRequest.signature,
|
|
898
|
+
hasSignedMessage: !!tokenProcessRequest.signedMessage,
|
|
899
|
+
hasIntermediateSigningKey: !!tokenProcessRequest.intermediateSigningKey,
|
|
900
|
+
});
|
|
901
|
+
console.log('[GooglePayService] startPaymentSession: Processing payment...');
|
|
818
902
|
const paymentResult = await this.processPayment(authToken, accountId, tokenProcessRequest);
|
|
903
|
+
console.log('[GooglePayService] startPaymentSession: Payment processed', paymentResult);
|
|
819
904
|
if (paymentResult.success) {
|
|
905
|
+
console.log('[GooglePayService] startPaymentSession: Payment successful', {
|
|
906
|
+
paymentMethodId: paymentResult.data.id,
|
|
907
|
+
});
|
|
820
908
|
return {
|
|
821
909
|
success: true,
|
|
822
910
|
paymentData: paymentData,
|
|
@@ -824,6 +912,7 @@ class GooglePayService {
|
|
|
824
912
|
};
|
|
825
913
|
}
|
|
826
914
|
else {
|
|
915
|
+
console.error('[GooglePayService] startPaymentSession: Payment processing failed');
|
|
827
916
|
return {
|
|
828
917
|
success: false,
|
|
829
918
|
error: {
|
|
@@ -834,11 +923,17 @@ class GooglePayService {
|
|
|
834
923
|
}
|
|
835
924
|
}
|
|
836
925
|
catch (error) {
|
|
926
|
+
console.error('[GooglePayService] startPaymentSession: Exception caught', error);
|
|
837
927
|
// Handle different types of errors
|
|
838
928
|
if (error && typeof error === 'object' && 'statusCode' in error) {
|
|
839
929
|
const googlePayError = error;
|
|
930
|
+
console.log('[GooglePayService] startPaymentSession: Google Pay error', {
|
|
931
|
+
statusCode: googlePayError.statusCode,
|
|
932
|
+
statusMessage: googlePayError.statusMessage,
|
|
933
|
+
});
|
|
840
934
|
switch (googlePayError.statusCode) {
|
|
841
935
|
case 'CANCELED':
|
|
936
|
+
console.log('[GooglePayService] startPaymentSession: User cancelled');
|
|
842
937
|
return {
|
|
843
938
|
success: false,
|
|
844
939
|
error: {
|
|
@@ -847,6 +942,7 @@ class GooglePayService {
|
|
|
847
942
|
},
|
|
848
943
|
};
|
|
849
944
|
case 'DEVELOPER_ERROR':
|
|
945
|
+
console.error('[GooglePayService] startPaymentSession: Developer error');
|
|
850
946
|
return {
|
|
851
947
|
success: false,
|
|
852
948
|
error: {
|
|
@@ -855,6 +951,9 @@ class GooglePayService {
|
|
|
855
951
|
},
|
|
856
952
|
};
|
|
857
953
|
default:
|
|
954
|
+
console.error('[GooglePayService] startPaymentSession: Unknown error', {
|
|
955
|
+
statusCode: googlePayError.statusCode,
|
|
956
|
+
});
|
|
858
957
|
return {
|
|
859
958
|
success: false,
|
|
860
959
|
error: {
|
|
@@ -864,6 +963,7 @@ class GooglePayService {
|
|
|
864
963
|
};
|
|
865
964
|
}
|
|
866
965
|
}
|
|
966
|
+
console.error('[GooglePayService] startPaymentSession: Generic error', error);
|
|
867
967
|
return {
|
|
868
968
|
success: false,
|
|
869
969
|
error: {
|
|
@@ -899,22 +999,43 @@ class GooglePayService {
|
|
|
899
999
|
* Prefetch payment data for faster loading
|
|
900
1000
|
*/
|
|
901
1001
|
prefetchPaymentData(paymentDataRequest) {
|
|
1002
|
+
console.log('[GooglePayService] prefetchPaymentData: Starting', {
|
|
1003
|
+
hasClient: !!this.googlePayClient,
|
|
1004
|
+
paymentDataRequest,
|
|
1005
|
+
});
|
|
902
1006
|
if (!this.googlePayClient) {
|
|
1007
|
+
console.warn('[GooglePayService] prefetchPaymentData: No client available');
|
|
903
1008
|
return;
|
|
904
1009
|
}
|
|
905
1010
|
const request = new GooglePay$1.GooglePayPaymentDataRequest(paymentDataRequest);
|
|
1011
|
+
console.log('[GooglePayService] prefetchPaymentData: Request created', {
|
|
1012
|
+
isValid: request.isValid,
|
|
1013
|
+
});
|
|
906
1014
|
if (!request.isValid) {
|
|
1015
|
+
console.warn('[GooglePayService] prefetchPaymentData: Invalid request');
|
|
907
1016
|
return;
|
|
908
1017
|
}
|
|
909
1018
|
try {
|
|
1019
|
+
console.log('[GooglePayService] prefetchPaymentData: Calling prefetchPaymentData');
|
|
910
1020
|
this.googlePayClient.prefetchPaymentData(request);
|
|
1021
|
+
console.log('[GooglePayService] prefetchPaymentData: Prefetch complete');
|
|
1022
|
+
}
|
|
1023
|
+
catch (error) {
|
|
1024
|
+
console.error('[GooglePayService] prefetchPaymentData: Error', error);
|
|
911
1025
|
}
|
|
912
|
-
catch (_error) { }
|
|
913
1026
|
}
|
|
914
1027
|
/**
|
|
915
1028
|
* Create a basic payment data request
|
|
916
1029
|
*/
|
|
917
|
-
static createPaymentDataRequest(amount, label, countryCode = 'US', currencyCode = 'USD', merchantName) {
|
|
1030
|
+
static createPaymentDataRequest(amount, label, countryCode = 'US', currencyCode = 'USD', merchantName, merchantId) {
|
|
1031
|
+
var _a;
|
|
1032
|
+
console.log('[GooglePayService] createPaymentDataRequest: Creating request', {
|
|
1033
|
+
amount,
|
|
1034
|
+
label,
|
|
1035
|
+
countryCode,
|
|
1036
|
+
currencyCode,
|
|
1037
|
+
merchantName,
|
|
1038
|
+
});
|
|
918
1039
|
const request = {
|
|
919
1040
|
apiVersion: 2,
|
|
920
1041
|
apiVersionMinor: 0,
|
|
@@ -927,10 +1048,17 @@ class GooglePayService {
|
|
|
927
1048
|
totalPriceLabel: label,
|
|
928
1049
|
},
|
|
929
1050
|
merchantInfo: {
|
|
1051
|
+
merchantId,
|
|
930
1052
|
merchantName,
|
|
931
1053
|
},
|
|
932
1054
|
};
|
|
933
|
-
|
|
1055
|
+
console.log('[GooglePayService] createPaymentDataRequest: Request created', {
|
|
1056
|
+
apiVersion: request.apiVersion,
|
|
1057
|
+
apiVersionMinor: request.apiVersionMinor,
|
|
1058
|
+
transactionInfo: request.transactionInfo,
|
|
1059
|
+
merchantInfo: request.merchantInfo,
|
|
1060
|
+
allowedPaymentMethodsCount: (_a = request.allowedPaymentMethods) === null || _a === void 0 ? void 0 : _a.length,
|
|
1061
|
+
});
|
|
934
1062
|
return request;
|
|
935
1063
|
}
|
|
936
1064
|
/**
|
|
@@ -1228,19 +1356,42 @@ const GooglePay = class {
|
|
|
1228
1356
|
this.showSkeleton = true;
|
|
1229
1357
|
this.handleGooglePayClick = async () => {
|
|
1230
1358
|
var _a;
|
|
1359
|
+
console.log('[GooglePay] handleGooglePayClick: Button clicked', {
|
|
1360
|
+
isProcessing: this.isProcessing,
|
|
1361
|
+
disabled: this.disabled,
|
|
1362
|
+
isAvailable: this.isAvailable,
|
|
1363
|
+
canMakePayments: this.canMakePayments,
|
|
1364
|
+
});
|
|
1231
1365
|
if (this.isProcessing ||
|
|
1232
1366
|
this.disabled ||
|
|
1233
1367
|
!this.isAvailable ||
|
|
1234
1368
|
!this.canMakePayments) {
|
|
1369
|
+
console.warn('[GooglePay] handleGooglePayClick: Payment blocked', {
|
|
1370
|
+
reason: this.isProcessing ? 'isProcessing' :
|
|
1371
|
+
this.disabled ? 'disabled' :
|
|
1372
|
+
!this.isAvailable ? 'notAvailable' :
|
|
1373
|
+
!this.canMakePayments ? 'cannotMakePayments' : 'unknown',
|
|
1374
|
+
});
|
|
1235
1375
|
return;
|
|
1236
1376
|
}
|
|
1237
1377
|
try {
|
|
1378
|
+
console.log('[GooglePay] handleGooglePayClick: Starting payment session');
|
|
1238
1379
|
this.isProcessing = true;
|
|
1239
1380
|
this.error = null;
|
|
1240
1381
|
this.googlePayStarted.emit();
|
|
1382
|
+
console.log('[GooglePay] handleGooglePayClick: googlePayStarted event emitted');
|
|
1241
1383
|
const paymentDataRequest = this.createPaymentDataRequest();
|
|
1384
|
+
console.log('[GooglePay] handleGooglePayClick: Starting payment session with service', {
|
|
1385
|
+
hasAuthToken: !!GooglePay$1.checkoutStore.authToken,
|
|
1386
|
+
accountId: GooglePay$1.checkoutStore.accountId,
|
|
1387
|
+
});
|
|
1242
1388
|
const result = await this.googlePayService.startPaymentSession(paymentDataRequest, GooglePay$1.checkoutStore.authToken, GooglePay$1.checkoutStore.accountId);
|
|
1389
|
+
console.log('[GooglePay] handleGooglePayClick: Payment session result', result);
|
|
1243
1390
|
if (result.success) {
|
|
1391
|
+
console.log('[GooglePay] handleGooglePayClick: Payment successful', {
|
|
1392
|
+
paymentMethodId: result.paymentMethodId,
|
|
1393
|
+
hasPaymentData: !!result.paymentData,
|
|
1394
|
+
});
|
|
1244
1395
|
this.googlePayCompleted.emit({
|
|
1245
1396
|
success: true,
|
|
1246
1397
|
paymentData: result.paymentData,
|
|
@@ -1248,16 +1399,21 @@ const GooglePay = class {
|
|
|
1248
1399
|
});
|
|
1249
1400
|
}
|
|
1250
1401
|
else {
|
|
1402
|
+
console.error('[GooglePay] handleGooglePayClick: Payment failed', {
|
|
1403
|
+
error: result.error,
|
|
1404
|
+
});
|
|
1251
1405
|
this.googlePayCompleted.emit({
|
|
1252
1406
|
success: false,
|
|
1253
1407
|
error: result.error,
|
|
1254
1408
|
});
|
|
1255
1409
|
if (((_a = result.error) === null || _a === void 0 ? void 0 : _a.code) === "USER_CANCELLED") {
|
|
1410
|
+
console.log('[GooglePay] handleGooglePayClick: User cancelled payment');
|
|
1256
1411
|
this.googlePayCancelled.emit();
|
|
1257
1412
|
}
|
|
1258
1413
|
}
|
|
1259
1414
|
}
|
|
1260
1415
|
catch (error) {
|
|
1416
|
+
console.error('[GooglePay] handleGooglePayClick: Exception during payment', error);
|
|
1261
1417
|
const errorMessage = error instanceof Error ? error.message : "Payment failed";
|
|
1262
1418
|
this.error = errorMessage;
|
|
1263
1419
|
this.googlePayCompleted.emit({
|
|
@@ -1267,27 +1423,48 @@ const GooglePay = class {
|
|
|
1267
1423
|
}
|
|
1268
1424
|
finally {
|
|
1269
1425
|
this.isProcessing = false;
|
|
1426
|
+
console.log('[GooglePay] handleGooglePayClick: Payment flow complete', {
|
|
1427
|
+
isProcessing: this.isProcessing,
|
|
1428
|
+
error: this.error,
|
|
1429
|
+
});
|
|
1270
1430
|
}
|
|
1271
1431
|
};
|
|
1272
1432
|
}
|
|
1273
1433
|
watchConfigChange() {
|
|
1434
|
+
console.log('[GooglePay] watchConfigChange: Configuration changed', {
|
|
1435
|
+
merchantId: this.merchantId,
|
|
1436
|
+
environment: this.environment,
|
|
1437
|
+
});
|
|
1274
1438
|
this.initializeGooglePay();
|
|
1275
1439
|
}
|
|
1276
1440
|
componentWillLoad() {
|
|
1441
|
+
console.log('[GooglePay] componentWillLoad: Initializing GooglePayService');
|
|
1277
1442
|
this.googlePayService = new GooglePayService();
|
|
1443
|
+
console.log('[GooglePay] componentWillLoad: GooglePayService created', {
|
|
1444
|
+
service: this.googlePayService,
|
|
1445
|
+
});
|
|
1278
1446
|
}
|
|
1279
1447
|
componentDidLoad() {
|
|
1448
|
+
console.log('[GooglePay] componentDidLoad: Setting up store subscriptions', {
|
|
1449
|
+
checkoutLoaded: GooglePay$1.checkoutStore.checkoutLoaded,
|
|
1450
|
+
paymentAmount: GooglePay$1.checkoutStore.paymentAmount,
|
|
1451
|
+
paymentCurrency: GooglePay$1.checkoutStore.paymentCurrency,
|
|
1452
|
+
paymentDescription: GooglePay$1.checkoutStore.paymentDescription,
|
|
1453
|
+
});
|
|
1280
1454
|
const unsub = GooglePay$1.onChange("paymentAmount", () => {
|
|
1455
|
+
console.log('[GooglePay] paymentAmount changed:', GooglePay$1.checkoutStore.paymentAmount);
|
|
1281
1456
|
this.prefetchPaymentData();
|
|
1282
1457
|
});
|
|
1283
1458
|
if (typeof unsub === 'function')
|
|
1284
1459
|
this.unsubscribes.push(unsub);
|
|
1285
1460
|
const unsubCurrency = GooglePay$1.onChange("paymentCurrency", () => {
|
|
1461
|
+
console.log('[GooglePay] paymentCurrency changed:', GooglePay$1.checkoutStore.paymentCurrency);
|
|
1286
1462
|
this.prefetchPaymentData();
|
|
1287
1463
|
});
|
|
1288
1464
|
if (typeof unsubCurrency === 'function')
|
|
1289
1465
|
this.unsubscribes.push(unsubCurrency);
|
|
1290
1466
|
const unsubDesc = GooglePay$1.onChange("paymentDescription", () => {
|
|
1467
|
+
console.log('[GooglePay] paymentDescription changed:', GooglePay$1.checkoutStore.paymentDescription);
|
|
1291
1468
|
this.prefetchPaymentData();
|
|
1292
1469
|
});
|
|
1293
1470
|
if (typeof unsubDesc === 'function')
|
|
@@ -1336,17 +1513,31 @@ const GooglePay = class {
|
|
|
1336
1513
|
* Prefetch payment data for faster load times of the Google Pay sheet.
|
|
1337
1514
|
*/
|
|
1338
1515
|
async prefetchPaymentData() {
|
|
1516
|
+
console.log('[GooglePay] prefetchPaymentData: Called', {
|
|
1517
|
+
isAvailable: this.isAvailable,
|
|
1518
|
+
canMakePayments: this.canMakePayments,
|
|
1519
|
+
});
|
|
1339
1520
|
if (!this.isAvailable || !this.canMakePayments) {
|
|
1521
|
+
console.warn('[GooglePay] prefetchPaymentData: Skipped - not available or cannot make payments');
|
|
1340
1522
|
return;
|
|
1341
1523
|
}
|
|
1342
1524
|
const paymentDataRequest = this.createPaymentDataRequest();
|
|
1525
|
+
console.log('[GooglePay] prefetchPaymentData: Prefetching', { paymentDataRequest });
|
|
1343
1526
|
this.googlePayService.prefetchPaymentData(paymentDataRequest);
|
|
1527
|
+
console.log('[GooglePay] prefetchPaymentData: Prefetch complete');
|
|
1344
1528
|
}
|
|
1345
1529
|
async initializeGooglePay() {
|
|
1530
|
+
console.log('[GooglePay] initializeGooglePay: Starting initialization');
|
|
1346
1531
|
try {
|
|
1347
1532
|
this.isLoading = true;
|
|
1348
1533
|
this.error = null;
|
|
1534
|
+
console.log('[GooglePay] initializeGooglePay: Checking payment amount', {
|
|
1535
|
+
paymentAmount: GooglePay$1.checkoutStore.paymentAmount,
|
|
1536
|
+
paymentCurrency: GooglePay$1.checkoutStore.paymentCurrency,
|
|
1537
|
+
paymentDescription: GooglePay$1.checkoutStore.paymentDescription,
|
|
1538
|
+
});
|
|
1349
1539
|
if (!GooglePay$1.checkoutStore.paymentAmount) {
|
|
1540
|
+
console.error('[GooglePay] initializeGooglePay: Missing payment amount');
|
|
1350
1541
|
this.error = "Missing required Google Pay configuration";
|
|
1351
1542
|
this.isLoading = false;
|
|
1352
1543
|
return;
|
|
@@ -1359,23 +1550,39 @@ const GooglePay = class {
|
|
|
1359
1550
|
buttonStyle: this.buttonStyle,
|
|
1360
1551
|
buttonSizeMode: this.buttonSizeMode,
|
|
1361
1552
|
};
|
|
1553
|
+
console.log('[GooglePay] initializeGooglePay: Config created', googlePayConfig);
|
|
1362
1554
|
this.googlePayService.initialize(googlePayConfig);
|
|
1555
|
+
console.log('[GooglePay] initializeGooglePay: Service initialized');
|
|
1363
1556
|
this.isAvailable = this.googlePayService.isAvailable();
|
|
1557
|
+
console.log('[GooglePay] initializeGooglePay: Availability check', {
|
|
1558
|
+
isAvailable: this.isAvailable,
|
|
1559
|
+
});
|
|
1364
1560
|
if (!this.isAvailable) {
|
|
1561
|
+
console.warn('[GooglePay] initializeGooglePay: Google Pay not available on device');
|
|
1365
1562
|
this.error = "Google Pay is not supported on this device";
|
|
1366
1563
|
this.isLoading = false;
|
|
1367
1564
|
return;
|
|
1368
1565
|
}
|
|
1566
|
+
console.log('[GooglePay] initializeGooglePay: Checking canMakePayments...');
|
|
1369
1567
|
this.canMakePayments = await this.googlePayService.canMakePayments();
|
|
1568
|
+
console.log('[GooglePay] initializeGooglePay: canMakePayments result', {
|
|
1569
|
+
canMakePayments: this.canMakePayments,
|
|
1570
|
+
});
|
|
1370
1571
|
if (!this.canMakePayments) {
|
|
1572
|
+
console.warn('[GooglePay] initializeGooglePay: Cannot make payments');
|
|
1371
1573
|
this.error = "Google Pay is not available for payments";
|
|
1372
1574
|
this.isLoading = false;
|
|
1373
1575
|
return;
|
|
1374
1576
|
}
|
|
1375
1577
|
const paymentDataRequest = this.createPaymentDataRequest();
|
|
1578
|
+
console.log('[GooglePay] initializeGooglePay: Prefetching payment data', {
|
|
1579
|
+
paymentDataRequest,
|
|
1580
|
+
});
|
|
1376
1581
|
this.googlePayService.prefetchPaymentData(paymentDataRequest);
|
|
1582
|
+
console.log('[GooglePay] initializeGooglePay: Initialization complete');
|
|
1377
1583
|
}
|
|
1378
1584
|
catch (error) {
|
|
1585
|
+
console.error('[GooglePay] initializeGooglePay: Error during initialization', error);
|
|
1379
1586
|
this.error =
|
|
1380
1587
|
error instanceof Error
|
|
1381
1588
|
? error.message
|
|
@@ -1383,19 +1590,37 @@ const GooglePay = class {
|
|
|
1383
1590
|
}
|
|
1384
1591
|
finally {
|
|
1385
1592
|
this.isLoading = false;
|
|
1593
|
+
console.log('[GooglePay] initializeGooglePay: Final state', {
|
|
1594
|
+
isLoading: this.isLoading,
|
|
1595
|
+
isAvailable: this.isAvailable,
|
|
1596
|
+
canMakePayments: this.canMakePayments,
|
|
1597
|
+
error: this.error,
|
|
1598
|
+
});
|
|
1386
1599
|
}
|
|
1387
1600
|
}
|
|
1388
1601
|
createPaymentDataRequest() {
|
|
1389
|
-
|
|
1602
|
+
const request = GooglePayService.createPaymentDataRequest(GooglePay$1.checkoutStore.paymentAmount, GooglePay$1.checkoutStore.paymentDescription, this.countryCode, GooglePay$1.checkoutStore.paymentCurrency, this.merchantName, this.merchantId);
|
|
1603
|
+
console.log('[GooglePay] createPaymentDataRequest: Created request', {
|
|
1604
|
+
amount: GooglePay$1.checkoutStore.paymentAmount,
|
|
1605
|
+
currency: GooglePay$1.checkoutStore.paymentCurrency,
|
|
1606
|
+
description: GooglePay$1.checkoutStore.paymentDescription,
|
|
1607
|
+
countryCode: this.countryCode,
|
|
1608
|
+
merchantName: this.merchantName,
|
|
1609
|
+
request,
|
|
1610
|
+
});
|
|
1611
|
+
return request;
|
|
1390
1612
|
}
|
|
1391
1613
|
render() {
|
|
1392
1614
|
const showError = !this.isLoading && !!this.error;
|
|
1393
1615
|
const showDeviceUnavailable = !this.isLoading && !this.error && !this.isAvailable;
|
|
1394
1616
|
const showPaymentsUnavailable = !this.isLoading && !this.error && this.isAvailable && !this.canMakePayments;
|
|
1395
1617
|
const showButton = !this.isLoading && !this.error && this.isAvailable && this.canMakePayments;
|
|
1396
|
-
return (index.h(styledHost.StyledHost, { key: '
|
|
1618
|
+
return (index.h(styledHost.StyledHost, { key: 'cf4dcfa14dd83683c0d6e811ea464968c38f38d6' }, GooglePay$1.checkoutStore.checkoutLoaded && (index.h("script", { key: 'e942fe8e2eb80ee0d2119e864c62d89a79d9d12a', async: true, src: 'https://pay.google.com/gp/p/js/pay.js', onLoad: () => {
|
|
1619
|
+
console.log('[GooglePay] Script loaded: Google Pay JS library loaded successfully');
|
|
1397
1620
|
this.initializeGooglePay();
|
|
1398
|
-
}
|
|
1621
|
+
}, onError: (e) => {
|
|
1622
|
+
console.error('[GooglePay] Script error: Failed to load Google Pay JS library', e);
|
|
1623
|
+
} })), index.h("div", { key: '7ce1234392d3ea3abdcb1a385462cf740f4b98bb', class: 'google-pay-container' }, index.h(GooglePaySkeleton, { key: '3532e93f39bb69d76663c159bc6b1322a39e1361', isLoading: this.isLoading }), showError && (index.h("div", { key: '9e42e567d383522d03bc361008cb470fd2e2d602', class: 'google-pay-error', role: 'alert', "data-testid": 'gp-error' }, index.h("span", { key: '8b49d628ff8f5175d36f82e32191f1f3291e826f', class: 'error-icon' }, "\u26A0\uFE0F"), index.h("span", { key: 'b01e94934cd30b8dbad3127239ea625c51511d35', class: 'error-message' }, this.error))), showDeviceUnavailable && (index.h("div", { key: '12ad123c7516e9ce2ad1084f6b0c366e8bb5b9d5', class: 'google-pay-unavailable', "data-testid": 'gp-device-unavailable' }, index.h("span", { key: 'e0fa8f13423b6b545b340cc4b2b0411e833202c6', class: 'unavailable-message' }, "Google Pay is not available on this device"))), showPaymentsUnavailable && (index.h("div", { key: 'acb4c6661ca0aa6b944c8ed67642c4ad9effa1e5', class: 'google-pay-unavailable', "data-testid": 'gp-payments-unavailable' }, index.h("span", { key: '8a83dc8f5140d3ecade1fd68f69b5ebeaeb020d2', class: 'unavailable-message' }, "Google Pay is not available for payments"))), showButton && (index.h(GooglePayButton, { key: '46ea586c90aaa5eb909af4f1dfcb873a7ac50069', "data-testid": 'gp-button', buttonType: this.buttonType, buttonStyle: this.buttonStyle, buttonSizeMode: this.buttonSizeMode, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleGooglePayClick }))), index.h("style", { key: '8f77166ec7d772f0c51c74cdb166f9e8ae295088' }, `
|
|
1399
1624
|
.google-pay-container {
|
|
1400
1625
|
width: 100%;
|
|
1401
1626
|
}
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-BhI7cJcE.js');
|
|
4
4
|
var utils = require('./utils-Cjq3ZCad.js');
|
|
5
|
-
var business_service = require('./business.service-
|
|
5
|
+
var business_service = require('./business.service-BggHdPOV.js');
|
|
6
6
|
var getBusiness = require('./get-business-D9ZHyPem.js');
|
|
7
7
|
var ComponentError = require('./ComponentError-D4OLnOkg.js');
|
|
8
|
-
var checkPkgVersion = require('./check-pkg-version-
|
|
8
|
+
var checkPkgVersion = require('./check-pkg-version-DuPkU5qI.js');
|
|
9
9
|
require('./parts-Pb06tUMp.js');
|
|
10
10
|
require('./Api-BeSnjEuW.js');
|
|
11
11
|
require('./config-state-CYoBVAca.js');
|
|
12
12
|
require('./index-mmd0OhmD.js');
|
|
13
13
|
require('./utils-Bab-tddY.js');
|
|
14
14
|
require('./dinero-BwNN_k7x.js');
|
|
15
|
-
require('./GooglePay-
|
|
15
|
+
require('./GooglePay-40aEKdDF.js');
|
|
16
16
|
require('./Dispute-CruQTF6_.js');
|
|
17
17
|
require('./index-CajjbB9t.js');
|
|
18
18
|
require('./Pagination-Dediz133.js');
|
|
19
19
|
require('./Business-DWHy_-z9.js');
|
|
20
20
|
require('./utils-DvUQQLmR.js');
|
|
21
|
-
require('./package
|
|
21
|
+
require('./package-C6nOTkVV.js');
|
|
22
22
|
|
|
23
23
|
const BusinessDetails = class {
|
|
24
24
|
constructor(hostRef) {
|
|
@@ -7,11 +7,11 @@ var businessIdentitySchema = require('./business-identity-schema-rMMiHyPz.js');
|
|
|
7
7
|
require('./config-state-CYoBVAca.js');
|
|
8
8
|
require('./dinero-BwNN_k7x.js');
|
|
9
9
|
var ComponentError = require('./ComponentError-D4OLnOkg.js');
|
|
10
|
-
require('./GooglePay-
|
|
10
|
+
require('./GooglePay-40aEKdDF.js');
|
|
11
11
|
require('./Pagination-Dediz133.js');
|
|
12
12
|
var Business = require('./Business-DWHy_-z9.js');
|
|
13
13
|
require('./Dispute-CruQTF6_.js');
|
|
14
|
-
var checkPkgVersion = require('./check-pkg-version-
|
|
14
|
+
var checkPkgVersion = require('./check-pkg-version-DuPkU5qI.js');
|
|
15
15
|
var button = require('./button-CARQPDm-.js');
|
|
16
16
|
var styledHost = require('./styled-host-D5g7INLE.js');
|
|
17
17
|
var header1 = require('./header-1-CBO8uDuZ.js');
|
|
@@ -19,7 +19,7 @@ require('./event-types-YOY5TKUN.js');
|
|
|
19
19
|
var skeleton = require('./skeleton-BF3HGL9X.js');
|
|
20
20
|
var eventTypes = require('./event-types-DNOUef41.js');
|
|
21
21
|
var paymentProvisioningActions = require('./payment-provisioning-actions-CZVlnRA0.js');
|
|
22
|
-
var business_service = require('./business.service-
|
|
22
|
+
var business_service = require('./business.service-BggHdPOV.js');
|
|
23
23
|
require('./_commonjsHelpers-BJu3ubxk.js');
|
|
24
24
|
require('./schema-validations-BOiGVUHM.js');
|
|
25
25
|
require('./country-config-MCOhn8o3.js');
|
|
@@ -27,7 +27,7 @@ require('./business-form-options-e9UFw4P-.js');
|
|
|
27
27
|
require('./index-mmd0OhmD.js');
|
|
28
28
|
require('./utils-Bab-tddY.js');
|
|
29
29
|
require('./index-CajjbB9t.js');
|
|
30
|
-
require('./package
|
|
30
|
+
require('./package-C6nOTkVV.js');
|
|
31
31
|
require('./Api-BeSnjEuW.js');
|
|
32
32
|
require('./parts-Pb06tUMp.js');
|
|
33
33
|
require('./utils-DvUQQLmR.js');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-BhI7cJcE.js');
|
|
4
|
-
var checkPkgVersion = require('./check-pkg-version-
|
|
5
|
-
var GooglePay = require('./GooglePay-
|
|
4
|
+
var checkPkgVersion = require('./check-pkg-version-DuPkU5qI.js');
|
|
5
|
+
var GooglePay = require('./GooglePay-40aEKdDF.js');
|
|
6
6
|
var parts = require('./parts-Pb06tUMp.js');
|
|
7
7
|
var styledHost = require('./styled-host-D5g7INLE.js');
|
|
8
8
|
require('./event-types-YOY5TKUN.js');
|
|
9
9
|
var index$1 = require('./index-CajjbB9t.js');
|
|
10
|
-
require('./package
|
|
10
|
+
require('./package-C6nOTkVV.js');
|
|
11
11
|
require('./Api-BeSnjEuW.js');
|
|
12
12
|
require('./config-state-CYoBVAca.js');
|
|
13
13
|
require('./index-mmd0OhmD.js');
|
|
@@ -4,7 +4,7 @@ var index = require('./index-BhI7cJcE.js');
|
|
|
4
4
|
require('./config-state-CYoBVAca.js');
|
|
5
5
|
require('./dinero-BwNN_k7x.js');
|
|
6
6
|
require('./ComponentError-D4OLnOkg.js');
|
|
7
|
-
var GooglePay = require('./GooglePay-
|
|
7
|
+
var GooglePay = require('./GooglePay-40aEKdDF.js');
|
|
8
8
|
require('./Pagination-Dediz133.js');
|
|
9
9
|
require('./Business-DWHy_-z9.js');
|
|
10
10
|
require('./Dispute-CruQTF6_.js');
|