@doujins/payments-ui 0.0.2 → 0.0.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/index.cjs +25 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -7
- package/dist/index.js.map +1 -1
- package/package.json +18 -17
package/dist/index.cjs
CHANGED
|
@@ -65,7 +65,7 @@ var loadCollectJs = (tokenizationKey) => {
|
|
|
65
65
|
if (existing) return;
|
|
66
66
|
const script = document.createElement("script");
|
|
67
67
|
script.src = SCRIPT_SRC;
|
|
68
|
-
script.setAttribute("data-tokenization-key",
|
|
68
|
+
script.setAttribute("data-tokenization-key", "8u8B78-23Z347-c2svF3-pbEb7G");
|
|
69
69
|
script.setAttribute("data-field-ccnumber-placeholder", "0000 0000 0000 0000");
|
|
70
70
|
script.setAttribute("data-field-ccexp-placeholder", "10 / 25");
|
|
71
71
|
script.setAttribute("data-field-cvv-placeholder", "123");
|
|
@@ -451,12 +451,30 @@ var createPaymentStore = (options) => vanilla.createStore((set, get) => {
|
|
|
451
451
|
};
|
|
452
452
|
return {
|
|
453
453
|
...initialState,
|
|
454
|
-
setSelectedMethod: (methodId) =>
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
454
|
+
setSelectedMethod: (methodId) => {
|
|
455
|
+
if (get().selectedMethodId === methodId) return;
|
|
456
|
+
set({ selectedMethodId: methodId });
|
|
457
|
+
},
|
|
458
|
+
setSolanaModalOpen: (open) => {
|
|
459
|
+
if (get().solanaModalOpen === open) return;
|
|
460
|
+
set({ solanaModalOpen: open });
|
|
461
|
+
},
|
|
462
|
+
setSolanaTab: (tab) => {
|
|
463
|
+
if (get().solanaTab === tab) return;
|
|
464
|
+
set({ solanaTab: tab });
|
|
465
|
+
},
|
|
466
|
+
setSolanaSelectedToken: (symbol) => {
|
|
467
|
+
if (get().solanaSelectedToken === symbol) return;
|
|
468
|
+
set({ solanaSelectedToken: symbol });
|
|
469
|
+
},
|
|
470
|
+
setSolanaTokenAmount: (amount) => {
|
|
471
|
+
if (get().solanaTokenAmount === amount) return;
|
|
472
|
+
set({ solanaTokenAmount: amount });
|
|
473
|
+
},
|
|
474
|
+
setSolanaTransactionId: (txId) => {
|
|
475
|
+
if (get().solanaTransactionId === txId) return;
|
|
476
|
+
set({ solanaTransactionId: txId });
|
|
477
|
+
},
|
|
460
478
|
startSavedPayment: () => {
|
|
461
479
|
notifyStatus("processing", { source: "saved-payment" });
|
|
462
480
|
set({ savedPaymentStatus: "processing", savedPaymentError: null });
|