@paypay/mini-app-js-sdk 1.54.0 → 1.56.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.
@@ -85,8 +85,8 @@ function normalizeNativeResponseData(data2) {
85
85
  }
86
86
  class JsBridge {
87
87
  constructor(global2) {
88
- this.version = "1.54.0";
89
- this.revision = "4441e8a";
88
+ this.version = "1.56.0";
89
+ this.revision = "071e234";
90
90
  this.messageHandlers = new Map();
91
91
  this.responseCallbacks = new Map();
92
92
  this.global = global2;
@@ -1583,35 +1583,6 @@ function getUserLocationRequest(params) {
1583
1583
  function isValidUrl(urlChallenge) {
1584
1584
  return /^https?:\/\//.test(urlChallenge);
1585
1585
  }
1586
- async function initAppDetail(accessToken) {
1587
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
1588
- const res = await ppFetch2({
1589
- method: "GET",
1590
- url: "web-api/app/v1/apps/detail",
1591
- headers: { Authorization: `Bearer ${accessToken}` }
1592
- });
1593
- if ((res == null ? void 0 : res.ppFetchResult) !== "success" || !((_b = (_a2 = res == null ? void 0 : res.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data)) {
1594
- removeAppDetail();
1595
- return false;
1596
- }
1597
- saveAppDetail(JSON.stringify({
1598
- appLogo: (_e = (_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.unsigned) == null ? void 0 : _d.data) == null ? void 0 : _e.appLogo,
1599
- appName: (_h = (_g = (_f = res == null ? void 0 : res.body) == null ? void 0 : _f.unsigned) == null ? void 0 : _g.data) == null ? void 0 : _h.appName,
1600
- openUrl: (_k = (_j = (_i = res == null ? void 0 : res.body) == null ? void 0 : _i.unsigned) == null ? void 0 : _j.data) == null ? void 0 : _k.openUrl,
1601
- whiteListDomains: (_n = (_m = (_l = res == null ? void 0 : res.body) == null ? void 0 : _l.unsigned) == null ? void 0 : _m.data) == null ? void 0 : _n.whiteListDomains,
1602
- isInternal: (_q = (_p = (_o = res == null ? void 0 : res.body) == null ? void 0 : _o.unsigned) == null ? void 0 : _p.data) == null ? void 0 : _q.isInternal,
1603
- window: (_t = (_s = (_r = res == null ? void 0 : res.body) == null ? void 0 : _r.unsigned) == null ? void 0 : _s.data) == null ? void 0 : _t.window,
1604
- subdomainCookieSharing: (_w = (_v = (_u = res == null ? void 0 : res.body) == null ? void 0 : _u.unsigned) == null ? void 0 : _v.data) == null ? void 0 : _w.subdomainCookieSharing
1605
- }));
1606
- return true;
1607
- }
1608
- function getAppDetail() {
1609
- const json = getAppDetail$1();
1610
- if (json) {
1611
- return JSON.parse(json);
1612
- }
1613
- return null;
1614
- }
1615
1586
  function reconstructParams(params) {
1616
1587
  if (!params) {
1617
1588
  return params;
@@ -1651,11 +1622,9 @@ function createWrapComplete(fn) {
1651
1622
  };
1652
1623
  }
1653
1624
  function openWebview(openWebviewParams) {
1654
- var _a2, _b, _c, _d;
1625
+ var _a2, _b, _c;
1655
1626
  const params = reconstructParams(openWebviewParams);
1656
1627
  let url;
1657
- let openUrl2 = null;
1658
- const appDetail = getAppDetail();
1659
1628
  try {
1660
1629
  url = new URL(params == null ? void 0 : params.url);
1661
1630
  } catch (error2) {
@@ -1664,18 +1633,14 @@ function openWebview(openWebviewParams) {
1664
1633
  });
1665
1634
  return;
1666
1635
  }
1667
- try {
1668
- openUrl2 = appDetail ? new URL(appDetail.openUrl) : null;
1669
- } catch (_) {
1670
- }
1671
- if (["http:", "https:"].includes(url.protocol) && ((params == null ? void 0 : params.style) === "external" || ((_b = appDetail == null ? void 0 : appDetail.whiteListDomains) == null ? void 0 : _b.includes(url.host)) || url.host === (openUrl2 == null ? void 0 : openUrl2.host))) {
1636
+ if (["http:", "https:"].includes(url.protocol)) {
1672
1637
  openWebviewInternal(params);
1673
1638
  } else {
1674
- return (_c = params == null ? void 0 : params.fail) == null ? void 0 : _c.call(params, {
1675
- errorCode: MiniAppErrorType.whiteListError
1639
+ return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, {
1640
+ errorCode: MiniAppErrorType.notAvailable
1676
1641
  });
1677
1642
  }
1678
- (_d = params == null ? void 0 : params.success) == null ? void 0 : _d.call(params);
1643
+ (_c = params == null ? void 0 : params.success) == null ? void 0 : _c.call(params);
1679
1644
  }
1680
1645
  function openWebviewInternal(params) {
1681
1646
  var _a2, _b;
@@ -1980,7 +1945,7 @@ const opaUrl = () => {
1980
1945
  const createHeaderMiniAppApi = (urlEndpoint, customHeaders) => {
1981
1946
  let headers = new Headers(__spreadValues({
1982
1947
  "Content-Type": "application/json",
1983
- "Client-Version": "1.54.0",
1948
+ "Client-Version": "1.56.0",
1984
1949
  "Client-OS-Type": getRuntime()
1985
1950
  }, customHeaders));
1986
1951
  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" || urlEndpoint === "web-api/app/v1/users/autoTopupConfiguration" || urlEndpoint === "web-api/app/v1/users/preTransactionAutoTopupConfiguration" || urlEndpoint === "web-api/app/v1/users/consultPaymentFeature") {
@@ -2134,6 +2099,35 @@ async function refreshToken() {
2134
2099
  }
2135
2100
  return false;
2136
2101
  }
2102
+ async function initAppDetail(accessToken) {
2103
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
2104
+ const res = await ppFetch2({
2105
+ method: "GET",
2106
+ url: "web-api/app/v1/apps/detail",
2107
+ headers: { Authorization: `Bearer ${accessToken}` }
2108
+ });
2109
+ if ((res == null ? void 0 : res.ppFetchResult) !== "success" || !((_b = (_a2 = res == null ? void 0 : res.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data)) {
2110
+ removeAppDetail();
2111
+ return false;
2112
+ }
2113
+ saveAppDetail(JSON.stringify({
2114
+ appLogo: (_e = (_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.unsigned) == null ? void 0 : _d.data) == null ? void 0 : _e.appLogo,
2115
+ appName: (_h = (_g = (_f = res == null ? void 0 : res.body) == null ? void 0 : _f.unsigned) == null ? void 0 : _g.data) == null ? void 0 : _h.appName,
2116
+ openUrl: (_k = (_j = (_i = res == null ? void 0 : res.body) == null ? void 0 : _i.unsigned) == null ? void 0 : _j.data) == null ? void 0 : _k.openUrl,
2117
+ whiteListDomains: (_n = (_m = (_l = res == null ? void 0 : res.body) == null ? void 0 : _l.unsigned) == null ? void 0 : _m.data) == null ? void 0 : _n.whiteListDomains,
2118
+ isInternal: (_q = (_p = (_o = res == null ? void 0 : res.body) == null ? void 0 : _o.unsigned) == null ? void 0 : _p.data) == null ? void 0 : _q.isInternal,
2119
+ window: (_t = (_s = (_r = res == null ? void 0 : res.body) == null ? void 0 : _r.unsigned) == null ? void 0 : _s.data) == null ? void 0 : _t.window,
2120
+ subdomainCookieSharing: (_w = (_v = (_u = res == null ? void 0 : res.body) == null ? void 0 : _u.unsigned) == null ? void 0 : _v.data) == null ? void 0 : _w.subdomainCookieSharing
2121
+ }));
2122
+ return true;
2123
+ }
2124
+ function getAppDetail() {
2125
+ const json = getAppDetail$1();
2126
+ if (json) {
2127
+ return JSON.parse(json);
2128
+ }
2129
+ return null;
2130
+ }
2137
2131
  async function initAppConfiguration() {
2138
2132
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
2139
2133
  const res = await ppFetch2({
@@ -9445,24 +9439,24 @@ function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
9445
9439
  const cssModules$1o = {};
9446
9440
  cssModules$1o["$style"] = style0$1o;
9447
9441
  var WalletBreakdown = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1z], ["__cssModules", cssModules$1o]]);
9448
- const wrapperClass$p = "_wrapperClass_123gn_1";
9449
- const ppmnaPaymentTypeContainer$4 = "_ppmnaPaymentTypeContainer_123gn_1";
9450
- const img$d = "_img_123gn_5";
9451
- const imgContainer$5 = "_imgContainer_123gn_18";
9452
- const roundStylePaymentType$4 = "_roundStylePaymentType_123gn_26";
9453
- const main$5 = "_main_123gn_32";
9454
- const sub$4 = "_sub_123gn_48";
9455
- const makePayWithAddress$4 = "_makePayWithAddress_123gn_58";
9456
- const makePaymentTypeContainer$4 = "_makePaymentTypeContainer_123gn_63";
9457
- const arrowContainer$6 = "_arrowContainer_123gn_68";
9458
- const arrowRight$4 = "_arrowRight_123gn_71";
9459
- const makePaymentArrowContainer$4 = "_makePaymentArrowContainer_123gn_81";
9460
- const walletContainer = "_walletContainer_123gn_86";
9461
- const subTitle$1 = "_subTitle_123gn_91";
9462
- const chargeContainer = "_chargeContainer_123gn_96";
9463
- const greenTick = "_greenTick_123gn_106";
9464
- const autoCharge = "_autoCharge_123gn_119";
9465
- const makePaymentRightAlign = "_makePaymentRightAlign_123gn_126";
9442
+ const wrapperClass$p = "_wrapperClass_15dit_1";
9443
+ const ppmnaPaymentTypeContainer$4 = "_ppmnaPaymentTypeContainer_15dit_1";
9444
+ const img$d = "_img_15dit_5";
9445
+ const imgContainer$5 = "_imgContainer_15dit_18";
9446
+ const roundStylePaymentType$4 = "_roundStylePaymentType_15dit_26";
9447
+ const main$5 = "_main_15dit_32";
9448
+ const sub$4 = "_sub_15dit_48";
9449
+ const makePayWithAddress$4 = "_makePayWithAddress_15dit_58";
9450
+ const makePaymentTypeContainer$4 = "_makePaymentTypeContainer_15dit_63";
9451
+ const arrowContainer$6 = "_arrowContainer_15dit_68";
9452
+ const arrowRight$4 = "_arrowRight_15dit_71";
9453
+ const makePaymentArrowContainer$4 = "_makePaymentArrowContainer_15dit_81";
9454
+ const walletContainer = "_walletContainer_15dit_86";
9455
+ const subTitle$1 = "_subTitle_15dit_91";
9456
+ const chargeContainer = "_chargeContainer_15dit_96";
9457
+ const greenTick = "_greenTick_15dit_106";
9458
+ const autoCharge = "_autoCharge_15dit_119";
9459
+ const makePaymentRightAlign = "_makePaymentRightAlign_15dit_126";
9466
9460
  var style0$1n = {
9467
9461
  wrapperClass: wrapperClass$p,
9468
9462
  ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$4,
@@ -9589,29 +9583,29 @@ function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
9589
9583
  const cssModules$1n = {};
9590
9584
  cssModules$1n["$style"] = style0$1n;
9591
9585
  var WalletType = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1y], ["__cssModules", cssModules$1n]]);
9592
- const wrapperClass$o = "_wrapperClass_1cpol_1";
9593
- const ppmnaPaymentTypeContainer$3 = "_ppmnaPaymentTypeContainer_1cpol_1";
9594
- const img$c = "_img_1cpol_5";
9595
- const imgContainer$4 = "_imgContainer_1cpol_18";
9596
- const roundStylePaymentType$3 = "_roundStylePaymentType_1cpol_26";
9597
- const main$4 = "_main_1cpol_32";
9598
- const sub$3 = "_sub_1cpol_48";
9599
- const makePayWithAddress$3 = "_makePayWithAddress_1cpol_58";
9600
- const makePaymentTypeContainer$3 = "_makePaymentTypeContainer_1cpol_63";
9601
- const arrowContainer$5 = "_arrowContainer_1cpol_68";
9602
- const arrowRight$3 = "_arrowRight_1cpol_71";
9603
- const makePaymentArrowContainer$3 = "_makePaymentArrowContainer_1cpol_81";
9604
- const mainLabel$5 = "_mainLabel_1cpol_85";
9605
- const auth = "_auth_1cpol_90";
9606
- const authText = "_authText_1cpol_100";
9607
- const cardImageContainer = "_cardImageContainer_1cpol_104";
9608
- const cardImg = "_cardImg_1cpol_107";
9609
- const content$h = "_content_1cpol_111";
9610
- const authenticated = "_authenticated_1cpol_121";
9611
- const notAuthenticated = "_notAuthenticated_1cpol_124";
9612
- const authorizedImg$1 = "_authorizedImg_1cpol_127";
9613
- const unAuthorizedImg$1 = "_unAuthorizedImg_1cpol_136";
9614
- const creditCard$1 = "_creditCard_1cpol_144";
9586
+ const wrapperClass$o = "_wrapperClass_11uh5_1";
9587
+ const ppmnaPaymentTypeContainer$3 = "_ppmnaPaymentTypeContainer_11uh5_1";
9588
+ const img$c = "_img_11uh5_5";
9589
+ const imgContainer$4 = "_imgContainer_11uh5_18";
9590
+ const roundStylePaymentType$3 = "_roundStylePaymentType_11uh5_26";
9591
+ const main$4 = "_main_11uh5_32";
9592
+ const sub$3 = "_sub_11uh5_48";
9593
+ const makePayWithAddress$3 = "_makePayWithAddress_11uh5_58";
9594
+ const makePaymentTypeContainer$3 = "_makePaymentTypeContainer_11uh5_63";
9595
+ const arrowContainer$5 = "_arrowContainer_11uh5_68";
9596
+ const arrowRight$3 = "_arrowRight_11uh5_71";
9597
+ const makePaymentArrowContainer$3 = "_makePaymentArrowContainer_11uh5_81";
9598
+ const mainLabel$5 = "_mainLabel_11uh5_85";
9599
+ const auth = "_auth_11uh5_90";
9600
+ const authText = "_authText_11uh5_100";
9601
+ const cardImageContainer = "_cardImageContainer_11uh5_104";
9602
+ const cardImg = "_cardImg_11uh5_107";
9603
+ const content$h = "_content_11uh5_111";
9604
+ const authenticated = "_authenticated_11uh5_121";
9605
+ const notAuthenticated = "_notAuthenticated_11uh5_124";
9606
+ const authorizedImg$1 = "_authorizedImg_11uh5_127";
9607
+ const unAuthorizedImg$1 = "_unAuthorizedImg_11uh5_136";
9608
+ const creditCard$1 = "_creditCard_11uh5_144";
9615
9609
  var style0$1m = {
9616
9610
  wrapperClass: wrapperClass$o,
9617
9611
  ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$3,
@@ -9783,24 +9777,24 @@ function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
9783
9777
  const cssModules$1m = {};
9784
9778
  cssModules$1m["$style"] = style0$1m;
9785
9779
  var CreditCardType = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1x], ["__cssModules", cssModules$1m]]);
9786
- const wrapperClass$n = "_wrapperClass_insy7_1";
9787
- const ppmnaPaymentTypeContainer$2 = "_ppmnaPaymentTypeContainer_insy7_1";
9788
- const img$a = "_img_insy7_5";
9789
- const imgContainer$3 = "_imgContainer_insy7_18";
9790
- const roundStylePaymentType$2 = "_roundStylePaymentType_insy7_26";
9791
- const main$3 = "_main_insy7_32";
9792
- const sub$2 = "_sub_insy7_48";
9793
- const makePayWithAddress$2 = "_makePayWithAddress_insy7_58";
9794
- const makePaymentTypeContainer$2 = "_makePaymentTypeContainer_insy7_63";
9795
- const arrowContainer$4 = "_arrowContainer_insy7_68";
9796
- const arrowRight$2 = "_arrowRight_insy7_71";
9797
- const makePaymentArrowContainer$2 = "_makePaymentArrowContainer_insy7_81";
9798
- const bankImg = "_bankImg_insy7_85";
9799
- const branchCode = "_branchCode_insy7_89";
9800
- const content$g = "_content_insy7_92";
9801
- const roundContainer = "_roundContainer_insy7_96";
9802
- const round$2 = "_round_insy7_26";
9803
- const bankName = "_bankName_insy7_102";
9780
+ const wrapperClass$n = "_wrapperClass_1lw1h_1";
9781
+ const ppmnaPaymentTypeContainer$2 = "_ppmnaPaymentTypeContainer_1lw1h_1";
9782
+ const img$a = "_img_1lw1h_5";
9783
+ const imgContainer$3 = "_imgContainer_1lw1h_18";
9784
+ const roundStylePaymentType$2 = "_roundStylePaymentType_1lw1h_26";
9785
+ const main$3 = "_main_1lw1h_32";
9786
+ const sub$2 = "_sub_1lw1h_48";
9787
+ const makePayWithAddress$2 = "_makePayWithAddress_1lw1h_58";
9788
+ const makePaymentTypeContainer$2 = "_makePaymentTypeContainer_1lw1h_63";
9789
+ const arrowContainer$4 = "_arrowContainer_1lw1h_68";
9790
+ const arrowRight$2 = "_arrowRight_1lw1h_71";
9791
+ const makePaymentArrowContainer$2 = "_makePaymentArrowContainer_1lw1h_81";
9792
+ const bankImg = "_bankImg_1lw1h_85";
9793
+ const branchCode = "_branchCode_1lw1h_89";
9794
+ const content$g = "_content_1lw1h_92";
9795
+ const roundContainer = "_roundContainer_1lw1h_96";
9796
+ const round$2 = "_round_1lw1h_26";
9797
+ const bankName = "_bankName_1lw1h_102";
9804
9798
  var style0$1l = {
9805
9799
  wrapperClass: wrapperClass$n,
9806
9800
  ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$2,
@@ -9932,23 +9926,23 @@ function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
9932
9926
  const cssModules$1l = {};
9933
9927
  cssModules$1l["$style"] = style0$1l;
9934
9928
  var BankType = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1w], ["__cssModules", cssModules$1l]]);
9935
- const wrapperClass$m = "_wrapperClass_101rj_1";
9936
- const ppmnaPaymentTypeContainer$1 = "_ppmnaPaymentTypeContainer_101rj_1";
9937
- const img$9 = "_img_101rj_5";
9938
- const imgContainer$2 = "_imgContainer_101rj_18";
9939
- const roundStylePaymentType$1 = "_roundStylePaymentType_101rj_26";
9940
- const main$2 = "_main_101rj_32";
9941
- const sub$1 = "_sub_101rj_48";
9942
- const makePayWithAddress$1 = "_makePayWithAddress_101rj_58";
9943
- const makePaymentTypeContainer$1 = "_makePaymentTypeContainer_101rj_63";
9944
- const arrowContainer$3 = "_arrowContainer_101rj_68";
9945
- const arrowRight$1 = "_arrowRight_101rj_71";
9946
- const makePaymentArrowContainer$1 = "_makePaymentArrowContainer_101rj_81";
9947
- const container$y = "_container_101rj_85";
9948
- const sbidImg = "_sbidImg_101rj_97";
9949
- const content$f = "_content_101rj_105";
9950
- const desc1 = "_desc1_101rj_118";
9951
- const desc2 = "_desc2_101rj_122";
9929
+ const wrapperClass$m = "_wrapperClass_sdttg_1";
9930
+ const ppmnaPaymentTypeContainer$1 = "_ppmnaPaymentTypeContainer_sdttg_1";
9931
+ const img$9 = "_img_sdttg_5";
9932
+ const imgContainer$2 = "_imgContainer_sdttg_18";
9933
+ const roundStylePaymentType$1 = "_roundStylePaymentType_sdttg_26";
9934
+ const main$2 = "_main_sdttg_32";
9935
+ const sub$1 = "_sub_sdttg_48";
9936
+ const makePayWithAddress$1 = "_makePayWithAddress_sdttg_58";
9937
+ const makePaymentTypeContainer$1 = "_makePaymentTypeContainer_sdttg_63";
9938
+ const arrowContainer$3 = "_arrowContainer_sdttg_68";
9939
+ const arrowRight$1 = "_arrowRight_sdttg_71";
9940
+ const makePaymentArrowContainer$1 = "_makePaymentArrowContainer_sdttg_81";
9941
+ const container$y = "_container_sdttg_85";
9942
+ const sbidImg = "_sbidImg_sdttg_97";
9943
+ const content$f = "_content_sdttg_105";
9944
+ const desc1 = "_desc1_sdttg_118";
9945
+ const desc2 = "_desc2_sdttg_122";
9952
9946
  var style0$1k = {
9953
9947
  wrapperClass: wrapperClass$m,
9954
9948
  ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$1,
@@ -10033,21 +10027,21 @@ function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
10033
10027
  const cssModules$1k = {};
10034
10028
  cssModules$1k["$style"] = style0$1k;
10035
10029
  var SbidType = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1v], ["__cssModules", cssModules$1k]]);
10036
- const wrapperClass$l = "_wrapperClass_1nwz1_1";
10037
- const ppmnaPaymentTypeContainer = "_ppmnaPaymentTypeContainer_1nwz1_1";
10038
- const img$8 = "_img_1nwz1_5";
10039
- const imgContainer$1 = "_imgContainer_1nwz1_18";
10040
- const roundStylePaymentType = "_roundStylePaymentType_1nwz1_26";
10041
- const main$1 = "_main_1nwz1_32";
10042
- const sub = "_sub_1nwz1_48";
10043
- const makePayWithAddress = "_makePayWithAddress_1nwz1_58";
10044
- const makePaymentTypeContainer = "_makePaymentTypeContainer_1nwz1_63";
10045
- const arrowContainer$2 = "_arrowContainer_1nwz1_68";
10046
- const arrowRight = "_arrowRight_1nwz1_71";
10047
- const makePaymentArrowContainer = "_makePaymentArrowContainer_1nwz1_81";
10048
- const container$x = "_container_1nwz1_86";
10049
- const subTitle = "_subTitle_1nwz1_91";
10050
- const imageContainer$5 = "_imageContainer_1nwz1_96";
10030
+ const wrapperClass$l = "_wrapperClass_1cjo2_1";
10031
+ const ppmnaPaymentTypeContainer = "_ppmnaPaymentTypeContainer_1cjo2_1";
10032
+ const img$8 = "_img_1cjo2_5";
10033
+ const imgContainer$1 = "_imgContainer_1cjo2_18";
10034
+ const roundStylePaymentType = "_roundStylePaymentType_1cjo2_26";
10035
+ const main$1 = "_main_1cjo2_32";
10036
+ const sub = "_sub_1cjo2_48";
10037
+ const makePayWithAddress = "_makePayWithAddress_1cjo2_58";
10038
+ const makePaymentTypeContainer = "_makePaymentTypeContainer_1cjo2_63";
10039
+ const arrowContainer$2 = "_arrowContainer_1cjo2_68";
10040
+ const arrowRight = "_arrowRight_1cjo2_71";
10041
+ const makePaymentArrowContainer = "_makePaymentArrowContainer_1cjo2_81";
10042
+ const container$x = "_container_1cjo2_86";
10043
+ const subTitle = "_subTitle_1cjo2_91";
10044
+ const imageContainer$5 = "_imageContainer_1cjo2_96";
10051
10045
  var style0$1j = {
10052
10046
  wrapperClass: wrapperClass$l,
10053
10047
  ppmnaPaymentTypeContainer,
@@ -22947,15 +22941,15 @@ const Lottie = defineComponent({
22947
22941
  }, null);
22948
22942
  }
22949
22943
  });
22950
- const wrapperClass$k = "_wrapperClass_192d5_7";
22951
- const container$w = "_container_192d5_7";
22952
- const header$a = "_header_192d5_21";
22953
- const arrow$2 = "_arrow_192d5_28";
22954
- const address$1 = "_address_192d5_37";
22955
- const arrowContainer$1 = "_arrowContainer_192d5_46";
22956
- const text$7 = "_text_192d5_57";
22944
+ const wrapperClass$k = "_wrapperClass_1ilm4_7";
22945
+ const container$w = "_container_1ilm4_7";
22946
+ const header$a = "_header_1ilm4_21";
22947
+ const arrow$2 = "_arrow_1ilm4_28";
22948
+ const address$1 = "_address_1ilm4_37";
22949
+ const arrowContainer$1 = "_arrowContainer_1ilm4_46";
22950
+ const text$7 = "_text_1ilm4_57";
22957
22951
  var style0$1i = {
22958
- "ppmna-default-font": "_ppmna-default-font_192d5_1",
22952
+ "ppmna-default-font": "_ppmna-default-font_1ilm4_1",
22959
22953
  wrapperClass: wrapperClass$k,
22960
22954
  container: container$w,
22961
22955
  header: header$a,
@@ -24004,12 +23998,12 @@ const PaymentMethod = defineComponent({
24004
23998
  return null;
24005
23999
  }
24006
24000
  });
24007
- const wrapperClass$e = "_wrapperClass_6gcou_1";
24008
- const methodItem$1 = "_methodItem_6gcou_1";
24009
- const topupMethodItem = "_topupMethodItem_6gcou_14";
24010
- const iconContainer$2 = "_iconContainer_6gcou_18";
24011
- const iconGreenTick$1 = "_iconGreenTick_6gcou_27";
24012
- const iconHidden$1 = "_iconHidden_6gcou_37";
24001
+ const wrapperClass$e = "_wrapperClass_74p4m_1";
24002
+ const methodItem$1 = "_methodItem_74p4m_1";
24003
+ const topupMethodItem = "_topupMethodItem_74p4m_14";
24004
+ const iconContainer$2 = "_iconContainer_74p4m_18";
24005
+ const iconGreenTick$1 = "_iconGreenTick_74p4m_27";
24006
+ const iconHidden$1 = "_iconHidden_74p4m_37";
24013
24007
  var style0$1c = {
24014
24008
  wrapperClass: wrapperClass$e,
24015
24009
  methodItem: methodItem$1,
@@ -24364,14 +24358,14 @@ function initRoot(props, { emit }) {
24364
24358
  function getRoot() {
24365
24359
  return inject(KEY$1);
24366
24360
  }
24367
- const root$8 = "_root_aevp4_1";
24368
- const editLink = "_editLink_aevp4_20";
24369
- const addressContainer$1 = "_addressContainer_aevp4_44";
24370
- const header$9 = "_header_aevp4_48";
24371
- const receiver = "_receiver_aevp4_59";
24372
- const selected$1 = "_selected_aevp4_63";
24373
- const selectedContainer = "_selectedContainer_aevp4_72";
24374
- const text$6 = "_text_aevp4_81";
24361
+ const root$8 = "_root_1h4sg_1";
24362
+ const editLink = "_editLink_1h4sg_20";
24363
+ const addressContainer$1 = "_addressContainer_1h4sg_44";
24364
+ const header$9 = "_header_1h4sg_48";
24365
+ const receiver = "_receiver_1h4sg_59";
24366
+ const selected$1 = "_selected_1h4sg_63";
24367
+ const selectedContainer = "_selectedContainer_1h4sg_72";
24368
+ const text$6 = "_text_1h4sg_81";
24375
24369
  var style0$19 = {
24376
24370
  root: root$8,
24377
24371
  editLink,
@@ -27135,42 +27129,42 @@ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
27135
27129
  ], 64);
27136
27130
  }
27137
27131
  var AppVue$7 = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$17]]);
27138
- const container$n = "_container_dtd8l_7";
27139
- const addContainer = "_addContainer_dtd8l_16";
27140
- const addContainerInsufficient = "_addContainerInsufficient_dtd8l_25";
27141
- const noAddContainer = "_noAddContainer_dtd8l_29";
27142
- const addContainerTopup = "_addContainerTopup_dtd8l_34";
27143
- const addAddress = "_addAddress_dtd8l_44";
27144
- const label$3 = "_label_dtd8l_54";
27145
- const change$2 = "_change_dtd8l_72";
27146
- const noaddmsgContainer = "_noaddmsgContainer_dtd8l_87";
27147
- const addressInfoContainer = "_addressInfoContainer_dtd8l_96";
27148
- const priceContainer$1 = "_priceContainer_dtd8l_100";
27149
- const priceNumber = "_priceNumber_dtd8l_111";
27150
- const priceUnit = "_priceUnit_dtd8l_130";
27151
- const successContainer$1 = "_successContainer_dtd8l_141";
27152
- const loadingText$2 = "_loadingText_dtd8l_148";
27153
- const payBtn = "_payBtn_dtd8l_166";
27154
- const payButton = "_payButton_dtd8l_185";
27155
- const cancel$2 = "_cancel_dtd8l_189";
27156
- const cancelBtn$1 = "_cancelBtn_dtd8l_198";
27157
- const chargeCancel = "_chargeCancel_dtd8l_206";
27158
- const payBtnSticky = "_payBtnSticky_dtd8l_210";
27159
- const payWrapper = "_payWrapper_dtd8l_223";
27160
- const bannerInfo$1 = "_bannerInfo_dtd8l_228";
27161
- const bannerIcon = "_bannerIcon_dtd8l_242";
27162
- const bannerTitle$2 = "_bannerTitle_dtd8l_246";
27163
- const price$3 = "_price_dtd8l_100";
27164
- const paymentContainer = "_paymentContainer_dtd8l_255";
27165
- const addressContainer = "_addressContainer_dtd8l_278";
27166
- const noAddressContainer = "_noAddressContainer_dtd8l_301";
27167
- const payment$2 = "_payment_dtd8l_255";
27168
- const insufficientAmount = "_insufficientAmount_dtd8l_328";
27169
- const arrow = "_arrow_dtd8l_346";
27170
- const defaultContainer = "_defaultContainer_dtd8l_360";
27171
- const payContainer = "_payContainer_dtd8l_379";
27132
+ const container$n = "_container_sui8p_7";
27133
+ const addContainer = "_addContainer_sui8p_16";
27134
+ const addContainerInsufficient = "_addContainerInsufficient_sui8p_25";
27135
+ const noAddContainer = "_noAddContainer_sui8p_29";
27136
+ const addContainerTopup = "_addContainerTopup_sui8p_34";
27137
+ const addAddress = "_addAddress_sui8p_44";
27138
+ const label$3 = "_label_sui8p_54";
27139
+ const change$2 = "_change_sui8p_72";
27140
+ const noaddmsgContainer = "_noaddmsgContainer_sui8p_87";
27141
+ const addressInfoContainer = "_addressInfoContainer_sui8p_96";
27142
+ const priceContainer$1 = "_priceContainer_sui8p_100";
27143
+ const priceNumber = "_priceNumber_sui8p_111";
27144
+ const priceUnit = "_priceUnit_sui8p_130";
27145
+ const successContainer$1 = "_successContainer_sui8p_141";
27146
+ const loadingText$2 = "_loadingText_sui8p_148";
27147
+ const payBtn = "_payBtn_sui8p_166";
27148
+ const payButton = "_payButton_sui8p_185";
27149
+ const cancel$2 = "_cancel_sui8p_189";
27150
+ const cancelBtn$1 = "_cancelBtn_sui8p_198";
27151
+ const chargeCancel = "_chargeCancel_sui8p_206";
27152
+ const payBtnSticky = "_payBtnSticky_sui8p_210";
27153
+ const payWrapper = "_payWrapper_sui8p_223";
27154
+ const bannerInfo$1 = "_bannerInfo_sui8p_228";
27155
+ const bannerIcon = "_bannerIcon_sui8p_242";
27156
+ const bannerTitle$2 = "_bannerTitle_sui8p_246";
27157
+ const price$3 = "_price_sui8p_100";
27158
+ const paymentContainer = "_paymentContainer_sui8p_255";
27159
+ const addressContainer = "_addressContainer_sui8p_278";
27160
+ const noAddressContainer = "_noAddressContainer_sui8p_301";
27161
+ const payment$2 = "_payment_sui8p_255";
27162
+ const insufficientAmount = "_insufficientAmount_sui8p_328";
27163
+ const arrow = "_arrow_sui8p_346";
27164
+ const defaultContainer = "_defaultContainer_sui8p_360";
27165
+ const payContainer = "_payContainer_sui8p_379";
27172
27166
  var style0$Y = {
27173
- "ppmna-default-font": "_ppmna-default-font_dtd8l_1",
27167
+ "ppmna-default-font": "_ppmna-default-font_sui8p_1",
27174
27168
  container: container$n,
27175
27169
  addContainer,
27176
27170
  addContainerInsufficient,
@@ -30378,18 +30372,23 @@ const useMakePaymentStore = defineStore("makePayment", {
30378
30372
  result: false
30379
30373
  };
30380
30374
  }
30381
- const { paymentMethodList, appealDescription } = ((_c = (_b = (_a2 = res == null ? void 0 : res.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data) == null ? void 0 : _c.payload) || {};
30375
+ const { paymentMethodList, appealDescription, paymentMethodPreference } = ((_c = (_b = (_a2 = res == null ? void 0 : res.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data) == null ? void 0 : _c.payload) || {};
30382
30376
  this.paymentMethodState.paymentMethods = paymentMethodList;
30383
30377
  const walletPaymentMethod = paymentMethodList ? paymentMethodList.find((elem2) => elem2.paymentMethodType === PaymentMethodType.WALLET) || null : null;
30384
30378
  if (walletPaymentMethod && walletPaymentMethod.descriptionBannerInfo) {
30385
30379
  this.paymentMethodState.bannerInfo = walletPaymentMethod.descriptionBannerInfo;
30386
30380
  }
30387
- const lastSavedMethod = getLastPaymentMethod();
30381
+ const isPaymentMethodPriorityEnabled = paymentMethodPreference.prioritizedPaymentMethodsEnabled;
30388
30382
  this.paymentMethodState.paymentMethods = paymentMethodList ? paymentMethodList.filter(function(method2) {
30389
30383
  return method2.paymentMethodType !== PaymentMethodType.PAY_LATER;
30390
30384
  }) : paymentMethodList;
30391
30385
  this.paymentMethodState.appealDescription = appealDescription;
30392
- this.paymentMethodState.selectPaymentIndex = isValidPaymentMethod(lastSavedMethod, (_d = this.paymentMethodState) == null ? void 0 : _d.paymentMethods) ? this.paymentMethodState.paymentMethods.findIndex((method2) => method2.paymentMethodId === lastSavedMethod) : findFirstValidMethod(this.paymentMethodState.paymentMethods);
30386
+ if (isPaymentMethodPriorityEnabled) {
30387
+ this.paymentMethodState.selectPaymentIndex = findFirstValidMethod(this.paymentMethodState.paymentMethods);
30388
+ } else {
30389
+ const lastSavedMethod = getLastPaymentMethod();
30390
+ this.paymentMethodState.selectPaymentIndex = isValidPaymentMethod(lastSavedMethod, (_d = this.paymentMethodState) == null ? void 0 : _d.paymentMethods) ? this.paymentMethodState.paymentMethods.findIndex((method2) => method2.paymentMethodId === lastSavedMethod) : findFirstValidMethod(this.paymentMethodState.paymentMethods);
30391
+ }
30393
30392
  return {
30394
30393
  res,
30395
30394
  result: true
@@ -34355,11 +34354,19 @@ async function execute$a(params) {
34355
34354
  return (_c = params == null ? void 0 : params.fail) == null ? void 0 : _c.call(params, { errorCode: MiniAppErrorType.serverError });
34356
34355
  }
34357
34356
  }
34358
- function scanCode(_params) {
34357
+ function scanCode(params) {
34358
+ var _a2, _b;
34359
34359
  if (isPayPayMiniApp()) {
34360
+ const clientId = getClientId();
34361
+ if (!clientId) {
34362
+ (_a2 = params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.sdkNotInitialized });
34363
+ return;
34364
+ }
34365
+ const redirectUrlOnCancel = (_b = params == null ? void 0 : params.redirectUrlOnCancel) != null ? _b : window.location.href;
34366
+ const deeplink = `paypay://miniapp?appId=${clientId}&redirectUrl=${encodeURIComponent(redirectUrlOnCancel)}&closeCurrentScreen=true`;
34360
34367
  closeApp({
34361
34368
  options: {
34362
- deeplink: "paypay://scan"
34369
+ deeplink: `paypay://scan?callbackdeeplink=${encodeURIComponent(deeplink)}`
34363
34370
  }
34364
34371
  });
34365
34372
  } else {
@@ -35439,7 +35446,7 @@ function debug(params) {
35439
35446
  function execute$6(params) {
35440
35447
  var _a2;
35441
35448
  (_a2 = params == null ? void 0 : params.success) == null ? void 0 : _a2.call(params, {
35442
- v: "1.54.0"
35449
+ v: "1.56.0"
35443
35450
  });
35444
35451
  }
35445
35452
  function useCallBack(props, ctx) {
@@ -41671,7 +41678,7 @@ class MiniAppModule extends JsBridgeModule {
41671
41678
  });
41672
41679
  }
41673
41680
  scanCode(params) {
41674
- scanCode();
41681
+ scanCode(params);
41675
41682
  }
41676
41683
  showAlert(params) {
41677
41684
  this.detectMode() === RuntimeEnv.JS ? showAlert(params) : this.jsBridge.callNative("showAlert", params);