@alipay/ams-checkout 0.0.1745390310-dev.5 → 0.0.1745808793-dev.0
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/umd/ams-checkout.min.js +1 -1
- package/esm/component/channel.js +9 -27
- package/esm/component/component.inline.style.js +1 -1
- package/esm/component/popupWindow.style.js +4 -1
- package/esm/config/index.d.ts +7 -7
- package/esm/config/index.js +7 -7
- package/esm/constant/index.d.ts +9 -0
- package/esm/constant/index.js +9 -0
- package/esm/core/component/ckp/index.d.ts +5 -15
- package/esm/core/component/ckp/index.js +26 -288
- package/esm/core/component/element/elementContainerService/containerService.d.ts +33 -0
- package/esm/core/component/element/elementContainerService/containerService.js +123 -0
- package/esm/core/component/element/elementContainerService/index.d.ts +20 -0
- package/esm/core/component/element/elementContainerService/index.js +63 -0
- package/esm/core/component/element/elementController/index.d.ts +27 -0
- package/esm/core/component/element/elementController/index.js +478 -0
- package/esm/core/component/element/elementProcessor/addressProcessor.d.ts +20 -0
- package/esm/core/component/element/elementProcessor/addressProcessor.js +160 -0
- package/esm/core/component/element/elementProcessor/authProcessor.d.ts +20 -0
- package/esm/core/component/element/elementProcessor/authProcessor.js +125 -0
- package/esm/core/component/element/elementProcessor/baseElementProcessor.d.ts +38 -0
- package/esm/core/component/element/elementProcessor/baseElementProcessor.js +85 -0
- package/esm/core/component/element/elementProcessor/paymentProcessor.d.ts +20 -0
- package/esm/core/component/element/elementProcessor/paymentProcessor.js +373 -0
- package/esm/core/component/element/index.d.ts +8 -46
- package/esm/core/component/element/index.js +28 -922
- package/esm/core/component/element/mock.d.ts +4 -0
- package/esm/core/component/element/mock.js +365 -1
- package/esm/core/component/element/type.d.ts +42 -1
- package/esm/core/component/element/util.d.ts +60 -0
- package/esm/core/component/element/util.js +451 -0
- package/esm/core/component/index.d.ts +5 -1
- package/esm/core/component/index.js +1 -2
- package/esm/core/component/oldElement/index.d.ts +59 -0
- package/esm/core/component/oldElement/index.js +956 -0
- package/esm/core/component/oldElement/mock.d.ts +6 -0
- package/esm/core/component/oldElement/mock.js +567 -0
- package/esm/core/component/oldElement/type.d.ts +351 -0
- package/esm/core/component/oldElement/type.js +81 -0
- package/esm/foundation/core/index.d.ts +6 -1
- package/esm/foundation/core/index.js +70 -35
- package/esm/foundation/index.d.ts +14 -0
- package/esm/foundation/index.js +13 -2
- package/esm/foundation/product-processor/easysafepay/index.js +12 -9
- package/esm/foundation/product-processor/element/index.d.ts +7 -0
- package/esm/foundation/product-processor/element/index.js +24 -0
- package/esm/foundation/service/container/index.d.ts +6 -3
- package/esm/foundation/service/container/index.js +45 -15
- package/esm/foundation/service/container/popup.d.ts +1 -1
- package/esm/foundation/service/event-center.js +1 -0
- package/esm/foundation/service/log/keys.js +3 -1
- package/esm/index.js +1 -0
- package/esm/plugin/applepay/service.d.ts +1 -1
- package/esm/plugin/applepay/service.js +3 -5
- package/esm/plugin/component/cashierApp.d.ts +1 -1
- package/esm/plugin/component/index.js +1 -1
- package/esm/types/index.d.ts +1 -2
- package/esm/types/index.js +1 -2
- package/package.json +1 -1
- package/esm/core/component/ckp/interface.d.ts +0 -540
- package/esm/core/component/ckp/interface.js +0 -233
- /package/esm/core/component/{element → oldElement}/components/address.d.ts +0 -0
- /package/esm/core/component/{element → oldElement}/components/address.js +0 -0
- /package/esm/core/component/{element → oldElement}/components/auth.d.ts +0 -0
- /package/esm/core/component/{element → oldElement}/components/auth.js +0 -0
- /package/esm/core/component/{element → oldElement}/components/payment.d.ts +0 -0
- /package/esm/core/component/{element → oldElement}/components/payment.js +0 -0
- /package/esm/core/component/{element → oldElement}/utils.d.ts +0 -0
- /package/esm/core/component/{element → oldElement}/utils.js +0 -0
@@ -1,6 +1,10 @@
|
|
1
|
+
export declare const sdkAction1: any;
|
2
|
+
export declare const sdkAction2: any;
|
1
3
|
export declare const sdkAction: any;
|
2
4
|
export declare const oneAccount1: any;
|
3
5
|
export declare const oneAccount2: any;
|
4
6
|
export declare const oneAccount: any;
|
5
7
|
export declare const paymentResult: any;
|
6
8
|
export declare const submitResult: any;
|
9
|
+
export declare const sdkActionUpdate: any;
|
10
|
+
export declare const oneAccountUpdate: any;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export var
|
1
|
+
export var sdkAction1 = {
|
2
2
|
accountInfo: {
|
3
3
|
accountStatus: 'EFFECTIVE',
|
4
4
|
email: 'test10@test.com'
|
@@ -361,6 +361,10 @@ export var sdkAction = {
|
|
361
361
|
},
|
362
362
|
success: true
|
363
363
|
};
|
364
|
+
export var sdkAction2 = {
|
365
|
+
success: false
|
366
|
+
};
|
367
|
+
export var sdkAction = sdkAction1;
|
364
368
|
export var oneAccount1 = {
|
365
369
|
accountInfo: {
|
366
370
|
accountStatus: 'EFFECTIVE',
|
@@ -564,4 +568,364 @@ export var submitResult = {
|
|
564
568
|
locale: 'en_US',
|
565
569
|
preferred: true
|
566
570
|
}]
|
571
|
+
};
|
572
|
+
export var sdkActionUpdate = {
|
573
|
+
amountConfirmRequired: false,
|
574
|
+
autoDebitWithToken: false,
|
575
|
+
checkoutSettings: '{\n "addressAutoComplete": true,\n "publicDetail": {\n "legalBusinessName": "Lazada Group",\n "businessName": "Lazada"\n },\n "paymentSettings": {\n "displayExpressCheckout": true,\n "allowPromotion": true,\n "collectCustomerEmail": true,\n "collectCustomerPhoneNo": true,\n "collectShippingPhoneNo": true,\n "collectShippingName": true,\n "displayAntomLogo": true,\n "displayLanguage": true,\n "defaultLanguage": "en_US",\n "redirectToMerchant": true,\n "paymentRedirectUrl": "https://www.baidu.com",\n "customFields": [\n {\n "labelType": "DROPDOWN",\n "labelName": "How did you hear about us?",\n "minLength": 0,\n "maxLength": 255,\n "labelCondition": "REQUIRED",\n "options": [\n "Search engine (Google, Bing, etc.)",\n "Social media",\n "Word of Mouth"\n ],\n "picLink": "http://100.88.104.107:8081/download?bucketName=ipay-ipaycrm-attachment&key=20240409009064IMHaa2545f192c99a8481deaecd9b8ea5ad_2tiZTpB3_20240402143510.jpg&expires=2028172654&accessKeyId=FM49eWrrO8EFqUO4&signature=rnLBSUx4M1I1zPWuZLqInjP79u4%3D&signatureType=OBJECT",\n "picTitle": "picTitle",\n "picTip": "picTip"\n }\n ]\n },\n "displaySettings": {\n "iconUrl": "https://cdn.marmot-cloud.com/storage/2022/8/2/bc7cb991-c8e2-4379-945f-aadae2bdf932.svg",\n "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/9/26/dfd471f3-da7d-4ef1-8486-cfa4301045c6.svg",\n "useLogo": true,\n "themeType": "LIGHT",\n "backgroundColor": "#ffffff",\n "accentColor": "#ffffff",\n "font": "POPPINS",\n "shape": "ROUNDED",\n "displayLayout": "LEFT_ORDER_AND_RIGHT_PAYMENT"\n }\n }',
|
576
|
+
errorActions: {},
|
577
|
+
extendInfo: {},
|
578
|
+
goods: [{
|
579
|
+
goodsName: 'Goods No.1',
|
580
|
+
goodsQuantity: '1',
|
581
|
+
goodsTotalAmount: {
|
582
|
+
amount: '200.00',
|
583
|
+
currency: 'PEN',
|
584
|
+
currencyLabel: 'S/.',
|
585
|
+
formattedAmount: '200.00',
|
586
|
+
formattedAmountWithCurrency: 'S/. 200.00',
|
587
|
+
value: '20000'
|
588
|
+
},
|
589
|
+
goodsTotalAmountView: {
|
590
|
+
currency: 'PEN',
|
591
|
+
currencyDivider: ' ',
|
592
|
+
currencyLabel: 'S/.',
|
593
|
+
currencySymbolPosition: 'L',
|
594
|
+
formattedValue: '200.00',
|
595
|
+
value: '200.00'
|
596
|
+
},
|
597
|
+
goodsUnitAmount: {
|
598
|
+
amount: '200.00',
|
599
|
+
currency: 'PEN',
|
600
|
+
currencyLabel: 'S/.',
|
601
|
+
formattedAmount: '200.00',
|
602
|
+
formattedAmountWithCurrency: 'S/. 200.00',
|
603
|
+
value: '20000'
|
604
|
+
},
|
605
|
+
goodsUnitAmountView: {
|
606
|
+
currency: 'PEN',
|
607
|
+
currencyDivider: ' ',
|
608
|
+
currencyLabel: 'S/.',
|
609
|
+
currencySymbolPosition: 'L',
|
610
|
+
formattedValue: '200.00',
|
611
|
+
value: '200.00'
|
612
|
+
},
|
613
|
+
referenceGoodsId: 'amsdm_good_tony_c_20230227_095825_922'
|
614
|
+
}, {
|
615
|
+
goodsName: 'Goods No.2',
|
616
|
+
goodsQuantity: '2',
|
617
|
+
goodsTotalAmount: {
|
618
|
+
amount: '40000',
|
619
|
+
currency: 'KRW',
|
620
|
+
currencyLabel: '₩',
|
621
|
+
formattedAmount: '40,000',
|
622
|
+
formattedAmountWithCurrency: '₩ 40,000',
|
623
|
+
value: '40000'
|
624
|
+
},
|
625
|
+
goodsTotalAmountView: {
|
626
|
+
currency: 'KRW',
|
627
|
+
currencyDivider: ' ',
|
628
|
+
currencyLabel: '₩',
|
629
|
+
currencySymbolPosition: 'L',
|
630
|
+
formattedValue: '40,000',
|
631
|
+
value: '40000'
|
632
|
+
},
|
633
|
+
goodsUnitAmount: {
|
634
|
+
amount: '20000',
|
635
|
+
currency: 'KRW',
|
636
|
+
currencyLabel: '₩',
|
637
|
+
formattedAmount: '20,000',
|
638
|
+
formattedAmountWithCurrency: '₩ 20,000',
|
639
|
+
value: '20000'
|
640
|
+
},
|
641
|
+
goodsUnitAmountView: {
|
642
|
+
currency: 'KRW',
|
643
|
+
currencyDivider: ' ',
|
644
|
+
currencyLabel: '₩',
|
645
|
+
currencySymbolPosition: 'L',
|
646
|
+
formattedValue: '20,000',
|
647
|
+
value: '20000'
|
648
|
+
},
|
649
|
+
referenceGoodsId: 'amsdm_good_tony_c_20230227_095825_922'
|
650
|
+
}],
|
651
|
+
links: {
|
652
|
+
policyInfo: '["{\\"title\\":\\"CheckoutPaymentLegal\\",\\"content\\":[{\\"title\\":\\"CheckoutPaymentLegal\\",\\"content\\":\\"<p>hello<a href=\\\\\\"https://www.baidu.com/\\\\\\"target=\\\\\\"_blank\\\\\\">world</a></p><ol><li>123123123</li><li>123123123123</li></ol>\\"}]}"]',
|
653
|
+
privacyLink: 'https://render.alipay.com/p/c/180021490000000150/index.html?agreementId=GL00100002',
|
654
|
+
cookieLink: 'https://render.alipay.com/p/c/180021490000000147/index.html?agreementId=GL00100001'
|
655
|
+
},
|
656
|
+
needInstallmentAbility: false,
|
657
|
+
needOtherElements: true,
|
658
|
+
orderAmount: {
|
659
|
+
amount: '200.00',
|
660
|
+
currency: 'BRL',
|
661
|
+
currencyLabel: 'R$',
|
662
|
+
formattedAmount: '200,00',
|
663
|
+
formattedAmountWithCurrency: 'R$ 200,00',
|
664
|
+
value: '20000'
|
665
|
+
},
|
666
|
+
orderAmountView: {
|
667
|
+
currency: 'BRL',
|
668
|
+
currencyDivider: ' ',
|
669
|
+
currencyLabel: 'R$',
|
670
|
+
currencySymbolPosition: 'L',
|
671
|
+
formattedValue: '200.00',
|
672
|
+
value: '200.00'
|
673
|
+
},
|
674
|
+
pageStyle: {
|
675
|
+
checkoutSettings: '{"addressAutoComplete":false}'
|
676
|
+
},
|
677
|
+
paymentAmount: {
|
678
|
+
amount: '200.00',
|
679
|
+
currency: 'BRL',
|
680
|
+
currencyLabel: 'R$',
|
681
|
+
formattedAmount: '200,00',
|
682
|
+
formattedAmountWithCurrency: 'R$ 200,00',
|
683
|
+
value: '20000'
|
684
|
+
},
|
685
|
+
paymentAmountView: {
|
686
|
+
currency: 'BRL',
|
687
|
+
currencyDivider: ' ',
|
688
|
+
currencyLabel: 'R$',
|
689
|
+
currencySymbolPosition: 'L',
|
690
|
+
formattedValue: '200.00',
|
691
|
+
value: '200.00'
|
692
|
+
},
|
693
|
+
paymentMethods: [{
|
694
|
+
antomPage: 'paymentMetaPage',
|
695
|
+
category: 'CARD',
|
696
|
+
icon: 'https://gw.alipay.com/icon/medium/default/ALIPAY_GENERAL_CARD.svg',
|
697
|
+
iconName: 'Card',
|
698
|
+
links: [],
|
699
|
+
logoList: [{
|
700
|
+
cardBrand: 'GWANGJUBANK',
|
701
|
+
logoUrl: 'https: //cdn.marmot-cloud.com/storage/2024/2/21/635b04a7-1086-4184-8122-98d9c2b99f0f.svg'
|
702
|
+
}, {
|
703
|
+
cardBrand: 'SHINHYEOP',
|
704
|
+
logoUrl: 'https: //cdn.marmot-cloud.com/storage/2024/2/23/bc083008-b6ca-4b51-8767-1aa0dce48f5a.svg'
|
705
|
+
}],
|
706
|
+
paymentElements: [{
|
707
|
+
paymentElementKey: 'paymentMethodId',
|
708
|
+
elementType: 'CARD',
|
709
|
+
elementMandatory: false,
|
710
|
+
title: 'Card Information',
|
711
|
+
defaultValue: '',
|
712
|
+
extendInfo: '{"needOtherElements":false,"isTempTokenization":"true"}',
|
713
|
+
subPaymentElementView: [{
|
714
|
+
defaultText: 'Card Number',
|
715
|
+
elementMandatory: true,
|
716
|
+
elementRegx: '^\\d{15,18}$',
|
717
|
+
elementType: 'DIGIT_18',
|
718
|
+
paramIllegalText: 'cardNo error',
|
719
|
+
paymentElementKey: 'cardNo',
|
720
|
+
title: 'Card Number',
|
721
|
+
defaultValue: '',
|
722
|
+
extendInfo: '{"excludeMetaDataCodes":"null","completeKey":"cc-number"}'
|
723
|
+
}, {
|
724
|
+
defaultText: 'CVV',
|
725
|
+
defaultValue: '',
|
726
|
+
elementMandatory: true,
|
727
|
+
elementRegx: '^\\d{3,4}$',
|
728
|
+
elementType: 'DIGIT_4',
|
729
|
+
extendInfo: '{"excludeMetaDataCodes":"null"}',
|
730
|
+
paramIllegalText: 'Please enter a valid 3 or 4 digit CVV number',
|
731
|
+
paymentElementKey: 'cardCVV'
|
732
|
+
}, {
|
733
|
+
defaultText: 'Name on Card',
|
734
|
+
elementMandatory: true,
|
735
|
+
elementRegx: '',
|
736
|
+
elementType: 'TEXT',
|
737
|
+
paramIllegalText: 'Please enter a Name on Card',
|
738
|
+
paymentElementKey: 'cardHolderName',
|
739
|
+
defaultValue: '',
|
740
|
+
extendInfo: '{"excludeMetaDataCodes":"null","completeKey":"cc-name"}'
|
741
|
+
}, {
|
742
|
+
defaultText: 'Exp Date(MM/YY)',
|
743
|
+
elementMandatory: true,
|
744
|
+
elementRegx: '.{5}',
|
745
|
+
paramIllegalText: 'Please enter a Exp Date',
|
746
|
+
elementType: 'TEXT',
|
747
|
+
paymentElementKey: 'expiryYear',
|
748
|
+
title: 'Please enter a Exp Date',
|
749
|
+
defaultValue: '',
|
750
|
+
extendInfo: '{"excludeMetaDataCodes":"null","completeKey":"cc-exp"}'
|
751
|
+
}, {
|
752
|
+
defaultText: 'Exp Date(MM/YY)',
|
753
|
+
elementMandatory: true,
|
754
|
+
elementRegx: '',
|
755
|
+
elementType: 'TEXT',
|
756
|
+
paymentElementKey: 'expiryMonth',
|
757
|
+
title: 'Please enter a Exp Date',
|
758
|
+
defaultValue: '',
|
759
|
+
extendInfo: '{"excludeMetaDataCodes":"null","completeKey":"cc-exp"}'
|
760
|
+
}]
|
761
|
+
}, {
|
762
|
+
defaultText: 'Save this payment method for future use.',
|
763
|
+
elementMandatory: false,
|
764
|
+
elementType: 'CHECKBOX',
|
765
|
+
extendInfo: '{}',
|
766
|
+
paymentElementKey: 'bindPaymentMethod'
|
767
|
+
}, {
|
768
|
+
elementMandatory: false,
|
769
|
+
elementType: 'DIGIT_4',
|
770
|
+
extendInfo: '[{"currency":"BRL","installmentAmount":"21,39","interestFree":"true","interestRate":"0.12%","orderAmount":"21,39","tenor":"1"}, {"currency":"BRL","installmentAmount":"10,39","interestFree":"true","interestRate":"0.12%","orderAmount":"21,39","tenor":"2"}]',
|
771
|
+
paymentElementKey: 'tenor',
|
772
|
+
title: 'Instalment plan',
|
773
|
+
defaultValue: ''
|
774
|
+
}, {
|
775
|
+
defaultText: '_ _ _. _ _ _. _ _ _-_ _',
|
776
|
+
defaultValue: '',
|
777
|
+
elementMandatory: true,
|
778
|
+
elementRegx: '^\\d{11}$',
|
779
|
+
elementType: 'DIGIT_11',
|
780
|
+
extendInfo: '{"customerId":"r35fPjeD0IhNOJrciVqCq10AKiD/uxk8rzaySdJM4tI=","merchantId":"188r35fPjeD0IhNOJrciVqCq10AKiD/uxk8rzaySdJM4tI=","needVerify":"true"}',
|
781
|
+
paramIllegalText: 'Please enter a valid 11-digit CPF number',
|
782
|
+
paymentElementKey: 'cpf',
|
783
|
+
title: 'CPF Code'
|
784
|
+
}, {
|
785
|
+
defaultText: 'Enter your email address',
|
786
|
+
defaultValue: '',
|
787
|
+
elementMandatory: true,
|
788
|
+
elementRegx: '^(([\\w-\\+\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,18}|[0-9]{1,3})(\\]?))$',
|
789
|
+
elementType: 'TEXT',
|
790
|
+
extendInfo: '{"excludeMetaDataCodes":"null"}',
|
791
|
+
paramIllegalText: 'Email address format invalid',
|
792
|
+
paymentElementKey: 'payerEmail',
|
793
|
+
title: 'Email'
|
794
|
+
}],
|
795
|
+
paymentMethod: 'CARD',
|
796
|
+
paymentMethodName: 'Card',
|
797
|
+
paymentMethodType: 'CARD',
|
798
|
+
webRedirectType: 'PAGE_REFRESH'
|
799
|
+
}],
|
800
|
+
savedPaymentMethods: [],
|
801
|
+
storePolicies: '[\\"{\\\\\\\\\\"title\\\\\\\\\\":\\\\\\\\\\"CheckoutPaymentLegal\\\\\\\\\\",\\\\\\\\\\"content\\\\\\\\\\":[{\\\\\\\\\\"title\\\\\\\\\\":\\\\\\\\\\"CheckoutPaymentLegal\\\\\\\\\\",\\\\\\\\\\"content\\\\\\\\\\":\\\\\\\\\\"<p>hello<ahref=\\\\\\\\\\\\\\\\\\\\\\\\\\"https://www.baidu.com/\\\\\\\\\\\\\\\\\\\\\\\\\\"target=\\\\\\\\\\\\\\\\\\\\\\\\\\"_blank\\\\\\\\\\\\\\\\\\\\\\\\\\">world</a></p><ol><li>123123123</li><li>123123123123</li></ol>\\\\\\\\\\"}]}\\",\\"{\\\\\\\\\\"title\\\\\\\\\\":\\\\\\\\\\"2188120013275594MerchantLegal\\\\\\\\\\",\\\\\\\\\\"content\\\\\\\\\\":[{\\\\\\\\\\"title\\\\\\\\\\":\\\\\\\\\\"2188120013275594MerchantLegal_0\\\\\\\\\\",\\\\\\\\\\"content\\\\\\\\\\":\\\\\\\\\\"<p>hello<ahref=\\\\\\\\\\\\\\\\\\\\\\\\\\"https://www.baidu.com/\\\\\\\\\\\\\\\\\\\\\\\\\\"target=\\\\\\\\\\\\\\\\\\\\\\\\\\"_blank\\\\\\\\\\\\\\\\\\\\\\\\\\">world</a></p><ol><li>MerchantLegal_0</li><li>MerchantLegal_0</li></ol>\\\\\\\\\\"},{\\\\\\\\\\"title\\\\\\\\\\":\\\\\\\\\\"2188120013275594MerchantLegal_1\\\\\\\\\\",\\\\\\\\\\"content\\\\\\\\\\":\\\\\\\\\\"<p>hello<ahref=\\\\\\\\\\\\\\\\\\\\\\\\\\"https://www.baidu.com/\\\\\\\\\\\\\\\\\\\\\\\\\\"target=\\\\\\\\\\\\\\\\\\\\\\\\\\"_blank\\\\\\\\\\\\\\\\\\\\\\\\\\">world</a></p><ol><li>MerchantLegal_1</li><li>MerchantLegal_1</li></ol>\\\\\\\\\\"}]}\\"]',
|
802
|
+
success: true,
|
803
|
+
redirectUrl: '',
|
804
|
+
supportedLanguages: [{
|
805
|
+
locale: 'en_US',
|
806
|
+
preferred: true,
|
807
|
+
title: 'English'
|
808
|
+
}, {
|
809
|
+
locale: 'it_IT',
|
810
|
+
preferred: false,
|
811
|
+
title: 'Português'
|
812
|
+
}, {
|
813
|
+
locale: 'de_DE',
|
814
|
+
preferred: false
|
815
|
+
}, {
|
816
|
+
locale: 'fr_FR',
|
817
|
+
preferred: false
|
818
|
+
}, {
|
819
|
+
locale: 'nl_NL',
|
820
|
+
preferred: false
|
821
|
+
}, {
|
822
|
+
locale: 'es_ES',
|
823
|
+
preferred: false
|
824
|
+
}, {
|
825
|
+
locale: 'zh_CN',
|
826
|
+
preferred: false
|
827
|
+
}, {
|
828
|
+
country: 'KR',
|
829
|
+
locale: 'ko_KR',
|
830
|
+
preferred: false,
|
831
|
+
title: '한국어'
|
832
|
+
}]
|
833
|
+
};
|
834
|
+
export var oneAccountUpdate = {
|
835
|
+
accountInfo: {
|
836
|
+
email: 'xxxxx@163.com',
|
837
|
+
accountStatus: 'EFFECTIVE',
|
838
|
+
oneAccountId: 'xxxxxxkk'
|
839
|
+
},
|
840
|
+
goods: {
|
841
|
+
goodsName: 'xxxxxxx',
|
842
|
+
goodsImageUrl: '',
|
843
|
+
goodsQuantity: 100,
|
844
|
+
goodsUnitAmount: {
|
845
|
+
currency: 'EUR',
|
846
|
+
value: 100,
|
847
|
+
currencyLabel: ''
|
848
|
+
}
|
849
|
+
},
|
850
|
+
paymentMethods: [{
|
851
|
+
paymentMethodType: 'CARD',
|
852
|
+
iconName: 'VISA',
|
853
|
+
icon: 'https://cdn.marmot-cloud.com/storage/2022/8/2/bc7cb991-c8e2-4379-945f-aadae2bdf932.svg',
|
854
|
+
paymentMethodId: 'card-id',
|
855
|
+
paymentMethodDetail: {
|
856
|
+
last4: '**** 1233'
|
857
|
+
}
|
858
|
+
}, {
|
859
|
+
paymentMethodType: 'CARD',
|
860
|
+
iconName: 'VISA2',
|
861
|
+
icon: 'https://cdn.marmot-cloud.com/storage/2022/8/2/bc7cb991-c8e2-4379-945f-aadae2bdf932.svg',
|
862
|
+
paymentMethodId: 'card-id2',
|
863
|
+
paymentMethodDetail: {
|
864
|
+
last4: '**** 1235'
|
865
|
+
}
|
866
|
+
}
|
867
|
+
// {
|
868
|
+
// "paymentMethodType": "dana",
|
869
|
+
// "iconName": "DANA",
|
870
|
+
// "icon": "https://cdn.marmot-cloud.com/storage/2022/8/2/bc7cb991-c8e2-4379-945f-aadae2bdf932.svg",
|
871
|
+
// "paymentMethodElements": {},
|
872
|
+
// },
|
873
|
+
],
|
874
|
+
links: {
|
875
|
+
privacyLink: 'https://global.alipay.com/docs/ac/Platform/bahzqeb-',
|
876
|
+
cookieLink: 'https://global.alipay.com/docs/ac/Platform/x1rhufzj'
|
877
|
+
},
|
878
|
+
shippings: [{
|
879
|
+
shippingName: {
|
880
|
+
firstName: '111111',
|
881
|
+
lastName: '11111'
|
882
|
+
},
|
883
|
+
prefer: '1',
|
884
|
+
shippingId: 'xxxx1',
|
885
|
+
shippingPhoneNo: 'xxxxxx123',
|
886
|
+
shippingAddress: {
|
887
|
+
region: 'ID',
|
888
|
+
state: 'Nusa',
|
889
|
+
city: 'Nusa Tenggara Bar.',
|
890
|
+
address1: 'Kec. Mataram, Kota Mataram',
|
891
|
+
address2: 'Jl. Bangil V No.6, Pagesangan Tim',
|
892
|
+
zipCode: '123445'
|
893
|
+
}
|
894
|
+
}],
|
895
|
+
metaData: {
|
896
|
+
countryList: [{
|
897
|
+
countryName: 'China',
|
898
|
+
default: true
|
899
|
+
}, {
|
900
|
+
countryName: 'Singapore',
|
901
|
+
default: false
|
902
|
+
}]
|
903
|
+
},
|
904
|
+
errorActions: {},
|
905
|
+
extendInfo: {},
|
906
|
+
merchantId: '111xT8bLnciQgqcy20+oOJoWUEbPMTwI0YILNBIicpASIs=',
|
907
|
+
needInstallmentAbility: false,
|
908
|
+
needOtherElements: false,
|
909
|
+
orderDescription: 'AMSDM_GIFT',
|
910
|
+
success: true,
|
911
|
+
supportedLanguages: [{
|
912
|
+
locale: 'en_US',
|
913
|
+
preferred: true,
|
914
|
+
title: 'English'
|
915
|
+
}, {
|
916
|
+
country: 'BR',
|
917
|
+
locale: 'pt_BR',
|
918
|
+
preferred: false,
|
919
|
+
title: 'Português'
|
920
|
+
}, {
|
921
|
+
country: 'KR',
|
922
|
+
locale: 'ko_KR',
|
923
|
+
preferred: false,
|
924
|
+
title: '한국어'
|
925
|
+
}, {
|
926
|
+
country: 'MX,CL,PE',
|
927
|
+
locale: 'es_ES',
|
928
|
+
preferred: false,
|
929
|
+
title: 'Español'
|
930
|
+
}]
|
567
931
|
};
|
@@ -1,4 +1,7 @@
|
|
1
|
-
import { ActionForm, ConnectErrorCode, IAmount, IAmountView, IPaymentMethod } from '../../../types';
|
1
|
+
import { ActionForm, ConnectErrorCode, IAmount, IAmountView, IMerchantAppointParam, IPaymentMethod } from '../../../types';
|
2
|
+
import AddressProcessor from './elementProcessor/addressProcessor';
|
3
|
+
import AuthProcessor from './elementProcessor/authProcessor';
|
4
|
+
import PaymentProcessor from './elementProcessor/paymentProcessor';
|
2
5
|
export declare enum ElementPaymentEvent {
|
3
6
|
RENDER_COMPONENT = "renderComponent",
|
4
7
|
CAPTURE_ASSET = "onCaptureAsset",
|
@@ -160,6 +163,8 @@ export interface PaymentMountOptions extends BaseMountOptions {
|
|
160
163
|
'radius-button': string;
|
161
164
|
};
|
162
165
|
};
|
166
|
+
notRedirectAfterComplete?: boolean;
|
167
|
+
merchantAppointParam?: IMerchantAppointParam;
|
163
168
|
}
|
164
169
|
export declare enum AddressEventCallbackName {
|
165
170
|
SHIPPING_CHANGE = "SHIPPING_CHANGE"
|
@@ -347,4 +352,40 @@ export interface AccountQueryResult {
|
|
347
352
|
errorStatus?: string;
|
348
353
|
shippingInfo?: CKPShipping;
|
349
354
|
}
|
355
|
+
export interface IElementOptions {
|
356
|
+
sessionData: string;
|
357
|
+
environment?: ELEMENT_ENVIRONMENT_TYPE;
|
358
|
+
locale?: string;
|
359
|
+
version?: string;
|
360
|
+
appearance?: {
|
361
|
+
theme: ThemeType.Default | ThemeType.Night;
|
362
|
+
};
|
363
|
+
onEventCallback?: ({ code, message, result }: {
|
364
|
+
code: EventCallbackCode;
|
365
|
+
message: string;
|
366
|
+
result?: any;
|
367
|
+
}) => void;
|
368
|
+
loading?: {
|
369
|
+
onStartLoading: () => void;
|
370
|
+
onEndLoading: () => void;
|
371
|
+
};
|
372
|
+
}
|
373
|
+
export interface IElementProcessors {
|
374
|
+
[ElementType.auth]: AuthProcessor;
|
375
|
+
[ElementType.address]: AddressProcessor;
|
376
|
+
[ElementType.payment]: PaymentProcessor;
|
377
|
+
}
|
378
|
+
export interface IToastOptions {
|
379
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center';
|
380
|
+
backgroundColor?: string;
|
381
|
+
color?: string;
|
382
|
+
padding?: string;
|
383
|
+
borderRadius?: string;
|
384
|
+
fontSize?: string;
|
385
|
+
zIndex?: number;
|
386
|
+
width?: string;
|
387
|
+
duration?: number;
|
388
|
+
icon?: 'SUCCESS' | 'FAIL';
|
389
|
+
spin?: boolean;
|
390
|
+
}
|
350
391
|
export {};
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { IElementStatus } from '../../../foundation';
|
2
|
+
import { Ianalytics, IPaymentSessionMetaData } from '../../../types';
|
3
|
+
import { ContainerController } from './elementContainerService/containerService';
|
4
|
+
import { ELEMENT_ENVIRONMENT_TYPE, IElementOptions, IToastOptions } from './type';
|
5
|
+
declare const formatElementOption: (options: IElementOptions) => {
|
6
|
+
environment: ELEMENT_ENVIRONMENT_TYPE;
|
7
|
+
locale?: string;
|
8
|
+
version?: string;
|
9
|
+
appearance?: {
|
10
|
+
theme: import("./type").ThemeType.Default | import("./type").ThemeType.Night;
|
11
|
+
};
|
12
|
+
onEventCallback?: ({ code, message, result }: {
|
13
|
+
code: import("./type").EventCallbackCode;
|
14
|
+
message: string;
|
15
|
+
result?: any;
|
16
|
+
}) => void;
|
17
|
+
loading?: {
|
18
|
+
onStartLoading: () => void;
|
19
|
+
onEndLoading: () => void;
|
20
|
+
};
|
21
|
+
sessionData: string;
|
22
|
+
};
|
23
|
+
/**
|
24
|
+
* 校验渲染条件
|
25
|
+
* 校验当前sdkSelector结点是否存在
|
26
|
+
*/
|
27
|
+
export declare function checkCanMount({ sdkSelector, containerService, status, }: {
|
28
|
+
sdkSelector: string;
|
29
|
+
containerService: ContainerController;
|
30
|
+
status: IElementStatus;
|
31
|
+
}): {
|
32
|
+
success: boolean;
|
33
|
+
errorMsg?: string;
|
34
|
+
};
|
35
|
+
export declare function checkCanUpdate({ status, paymentContainerService, newPaymentSessionData, oldPaymentSessionData, }: {
|
36
|
+
status: IElementStatus;
|
37
|
+
paymentContainerService: ContainerController;
|
38
|
+
newPaymentSessionData: string;
|
39
|
+
oldPaymentSessionData: string;
|
40
|
+
}): boolean;
|
41
|
+
export declare function generateIframeSrc({ paymentSessionObj, paymentSession, instanceId, environment, appVersion, analytics, locale, pageUrl, link, }: {
|
42
|
+
paymentSessionObj: IPaymentSessionMetaData;
|
43
|
+
paymentSession: string;
|
44
|
+
environment: string;
|
45
|
+
analytics: Ianalytics;
|
46
|
+
locale: string;
|
47
|
+
instanceId: string;
|
48
|
+
pageUrl: string;
|
49
|
+
appVersion: string;
|
50
|
+
link?: string;
|
51
|
+
}): string;
|
52
|
+
export declare function handleRedirect(data: any, fromFastSdk?: boolean): void;
|
53
|
+
export declare function redirect(data: {
|
54
|
+
normalUrl?: string;
|
55
|
+
schemeUrl?: string;
|
56
|
+
applinkUrl?: string;
|
57
|
+
callAppJudgeTime?: number;
|
58
|
+
}): Promise<void>;
|
59
|
+
export declare function showToast(options?: IToastOptions, callback?: Function): void;
|
60
|
+
export { formatElementOption };
|