@paypay/mini-app-js-sdk 1.38.0 → 1.39.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.
|
@@ -65,8 +65,8 @@ function normalizeNativeResponseData(data2) {
|
|
|
65
65
|
}
|
|
66
66
|
class JsBridge {
|
|
67
67
|
constructor(global2) {
|
|
68
|
-
this.version = "1.
|
|
69
|
-
this.revision = "
|
|
68
|
+
this.version = "1.39.0";
|
|
69
|
+
this.revision = "e9ad76f";
|
|
70
70
|
this.messageHandlers = new Map();
|
|
71
71
|
this.responseCallbacks = new Map();
|
|
72
72
|
this.global = global2;
|
|
@@ -1728,7 +1728,7 @@ const opaUrl = () => {
|
|
|
1728
1728
|
const createHeaderMiniAppApi = (urlEndpoint, customHeaders) => {
|
|
1729
1729
|
let headers = new Headers(__spreadValues({
|
|
1730
1730
|
"Content-Type": "application/json",
|
|
1731
|
-
"Client-Version": "1.
|
|
1731
|
+
"Client-Version": "1.39.0",
|
|
1732
1732
|
"Client-OS-Type": getRuntime()
|
|
1733
1733
|
}, customHeaders));
|
|
1734
1734
|
if (urlEndpoint === "web-api/app/v2/payment/methods" || urlEndpoint === "web-api/app/v2/payment/consult" || urlEndpoint === "web-api/app/v1/payment/cashbackDetail" || urlEndpoint === "web-api/app/v1/confirmAgeForCashback" || urlEndpoint === "web-api/app/v1/internal/request" || urlEndpoint === "web-api/app/v1/addressbyzip" || urlEndpoint === "/web-api/app/platform/v1/balance") {
|
|
@@ -31571,17 +31571,10 @@ const _sfc_main$z = defineComponent({
|
|
|
31571
31571
|
}
|
|
31572
31572
|
});
|
|
31573
31573
|
const _pay = async () => {
|
|
31574
|
-
var _a
|
|
31575
|
-
if (selectedCardMethod.value) {
|
|
31576
|
-
const isAuthenticated = (_a = selectedCardMethod.value.creditCardInfo) == null ? void 0 : _a.isAuthenticated;
|
|
31577
|
-
if (!isAuthenticated) {
|
|
31578
|
-
show3DSecureSheet.value = true;
|
|
31579
|
-
return;
|
|
31580
|
-
}
|
|
31581
|
-
}
|
|
31574
|
+
var _a;
|
|
31582
31575
|
startPaying();
|
|
31583
31576
|
if (props.showUserAddress && (selectedAddress == null ? void 0 : selectedAddress.value))
|
|
31584
|
-
setSelectedAddress((
|
|
31577
|
+
setSelectedAddress((_a = selectedAddress == null ? void 0 : selectedAddress.value) == null ? void 0 : _a.id).catch(() => {
|
|
31585
31578
|
});
|
|
31586
31579
|
const res = await pay2();
|
|
31587
31580
|
if (!res)
|
|
@@ -31589,13 +31582,13 @@ const _sfc_main$z = defineComponent({
|
|
|
31589
31582
|
const address2 = (selectedAddress == null ? void 0 : selectedAddress.value) ? __spreadValues({}, selectedAddress.value) : null;
|
|
31590
31583
|
paymentSuccess(res, address2);
|
|
31591
31584
|
watch(() => paymentHandler.value, async () => {
|
|
31592
|
-
var _a2,
|
|
31585
|
+
var _a2, _b;
|
|
31593
31586
|
if (!(paymentHandler == null ? void 0 : paymentHandler.value))
|
|
31594
31587
|
return;
|
|
31595
31588
|
const cashBack2 = getCashBackDetail({
|
|
31596
31589
|
paymentId: res.unsigned.data.paymentId
|
|
31597
31590
|
});
|
|
31598
|
-
const alwaysDisplay = ((_a2 = props == null ? void 0 : props.paymentParams) == null ? void 0 : _a2.alwaysDisplayCompletionScreen) || ((
|
|
31591
|
+
const alwaysDisplay = ((_a2 = props == null ? void 0 : props.paymentParams) == null ? void 0 : _a2.alwaysDisplayCompletionScreen) || ((_b = props == null ? void 0 : props.paymentParams) == null ? void 0 : _b.isAuthorization);
|
|
31599
31592
|
endPayment();
|
|
31600
31593
|
if (alwaysDisplay) {
|
|
31601
31594
|
showPaymentResult(res.unsigned.data);
|
|
@@ -31613,6 +31606,15 @@ const _sfc_main$z = defineComponent({
|
|
|
31613
31606
|
const paymentMethodForTopup = ref();
|
|
31614
31607
|
const amountForTopup = ref(0);
|
|
31615
31608
|
const beforeTopupAndPay = (beforeTopupAndPayParams) => {
|
|
31609
|
+
var _a;
|
|
31610
|
+
if (beforeTopupAndPayParams.paymentMethod.creditCardInfo) {
|
|
31611
|
+
selectedTopupMethod.value = beforeTopupAndPayParams.paymentMethod;
|
|
31612
|
+
const isAuthenticated = (_a = selectedTopupMethod.value.creditCardInfo) == null ? void 0 : _a.isAuthenticated;
|
|
31613
|
+
if (!isAuthenticated) {
|
|
31614
|
+
show3DSecureSheet.value = true;
|
|
31615
|
+
return;
|
|
31616
|
+
}
|
|
31617
|
+
}
|
|
31616
31618
|
amountForTopup.value = beforeTopupAndPayParams.amount;
|
|
31617
31619
|
paymentMethodForTopup.value = beforeTopupAndPayParams.paymentMethod;
|
|
31618
31620
|
const isDuplicateTopup = checkDuplicateTopup2(amountForTopup.value);
|
|
@@ -31668,16 +31670,10 @@ const _sfc_main$z = defineComponent({
|
|
|
31668
31670
|
}
|
|
31669
31671
|
};
|
|
31670
31672
|
const show3DSecureSheet = ref(false);
|
|
31671
|
-
const
|
|
31672
|
-
var _a;
|
|
31673
|
-
if ((_a = paymentMethod2.value) == null ? void 0 : _a.creditCardInfo) {
|
|
31674
|
-
return paymentMethod2.value;
|
|
31675
|
-
}
|
|
31676
|
-
return void 0;
|
|
31677
|
-
});
|
|
31673
|
+
const selectedTopupMethod = ref(void 0);
|
|
31678
31674
|
const selectedCCType = computed(() => {
|
|
31679
31675
|
var _a, _b;
|
|
31680
|
-
return (_b = (_a =
|
|
31676
|
+
return (_b = (_a = selectedTopupMethod.value) == null ? void 0 : _a.creditCardInfo) == null ? void 0 : _b.ccType;
|
|
31681
31677
|
});
|
|
31682
31678
|
const close3DSecureSheet = () => {
|
|
31683
31679
|
show3DSecureSheet.value = false;
|
|
@@ -31752,9 +31748,9 @@ const _sfc_main$z = defineComponent({
|
|
|
31752
31748
|
confirmCloseConfirmation,
|
|
31753
31749
|
cancelCloseConfirmation,
|
|
31754
31750
|
show3DSecureSheet,
|
|
31755
|
-
|
|
31756
|
-
|
|
31757
|
-
|
|
31751
|
+
selectedTopupMethod,
|
|
31752
|
+
close3DSecureSheet,
|
|
31753
|
+
selectedCCType
|
|
31758
31754
|
};
|
|
31759
31755
|
}
|
|
31760
31756
|
});
|
|
@@ -34706,7 +34702,7 @@ function debug(params) {
|
|
|
34706
34702
|
function execute$6(params) {
|
|
34707
34703
|
var _a;
|
|
34708
34704
|
(_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params, {
|
|
34709
|
-
v: "1.
|
|
34705
|
+
v: "1.39.0"
|
|
34710
34706
|
});
|
|
34711
34707
|
}
|
|
34712
34708
|
function useCallBack(props, ctx) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType, ComputedRef } from 'vue';
|
|
1
|
+
import { PropType, ComputedRef, Ref } from 'vue';
|
|
2
2
|
import { Address, MakePaymentParams } from '../../types';
|
|
3
3
|
import { PaymentMethod, InsufficientBalanceInfo, CreditMethod } from '../../model/makePayment';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -176,10 +176,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
176
176
|
showCloseConfirmation: ComputedRef<boolean>;
|
|
177
177
|
confirmCloseConfirmation: () => void;
|
|
178
178
|
cancelCloseConfirmation: () => void;
|
|
179
|
-
show3DSecureSheet:
|
|
180
|
-
|
|
181
|
-
selectedCardMethod: ComputedRef<CreditMethod | undefined>;
|
|
179
|
+
show3DSecureSheet: Ref<boolean>;
|
|
180
|
+
selectedTopupMethod: Ref<CreditMethod | undefined>;
|
|
182
181
|
close3DSecureSheet: () => void;
|
|
182
|
+
selectedCCType: ComputedRef<string | undefined>;
|
|
183
183
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
184
184
|
click: () => true;
|
|
185
185
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|