straumur-web-component 0.3.5 → 0.3.7
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 +21 -7
- package/dist/index.mjs +21 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1362,10 +1362,14 @@ function GooglePayComponent({ configuration, paymentMethods }) {
|
|
|
1362
1362
|
currency: paymentMethods.currency
|
|
1363
1363
|
},
|
|
1364
1364
|
onError: handleOnError,
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1365
|
+
onPaymentCompleted: (data, _) => {
|
|
1366
|
+
console.log("Adyen Payment completed", data);
|
|
1367
|
+
configuration.onPaymentCompleted?.();
|
|
1368
|
+
},
|
|
1369
|
+
onPaymentFailed: (data, _) => {
|
|
1370
|
+
console.log("Adyen Payment failed", data);
|
|
1371
|
+
configuration.onPaymentFailed?.();
|
|
1372
|
+
}
|
|
1369
1373
|
});
|
|
1370
1374
|
const gpayConfig = paymentMethods.paymentMethods.paymentMethods.find((x) => x.type === "googlepay").configuration;
|
|
1371
1375
|
const googlePayConfiguration = {
|
|
@@ -1375,6 +1379,16 @@ function GooglePayComponent({ configuration, paymentMethods }) {
|
|
|
1375
1379
|
},
|
|
1376
1380
|
countryCode: "IS",
|
|
1377
1381
|
environment: configuration.environment,
|
|
1382
|
+
onSubmit: handleOnSubmit,
|
|
1383
|
+
onAdditionalDetails: handleOnSubmitAdditionalData,
|
|
1384
|
+
onPaymentCompleted: (data, _) => {
|
|
1385
|
+
console.log("GooglePay Payment completed", data);
|
|
1386
|
+
configuration.onPaymentCompleted?.();
|
|
1387
|
+
},
|
|
1388
|
+
onPaymentFailed: (data, _) => {
|
|
1389
|
+
console.log("GooglePay Payment failed", data);
|
|
1390
|
+
configuration.onPaymentFailed?.();
|
|
1391
|
+
},
|
|
1378
1392
|
configuration: {
|
|
1379
1393
|
...gpayConfig,
|
|
1380
1394
|
merchantName: paymentMethods.merchantName
|
|
@@ -1537,9 +1551,8 @@ function ApplePayComponent({ configuration, paymentMethods }) {
|
|
|
1537
1551
|
value: paymentMethods.minorUnitsAmount,
|
|
1538
1552
|
currency: paymentMethods.currency
|
|
1539
1553
|
},
|
|
1540
|
-
onError: handleOnError,
|
|
1541
|
-
onSubmit: handleOnSubmit,
|
|
1542
1554
|
onAdditionalDetails: handleOnSubmitAdditionalData,
|
|
1555
|
+
onError: handleOnError,
|
|
1543
1556
|
onPaymentCompleted: configuration.onPaymentCompleted,
|
|
1544
1557
|
onPaymentFailed: configuration.onPaymentFailed
|
|
1545
1558
|
});
|
|
@@ -1553,7 +1566,8 @@ function ApplePayComponent({ configuration, paymentMethods }) {
|
|
|
1553
1566
|
configuration: {
|
|
1554
1567
|
...apayConfig,
|
|
1555
1568
|
merchantName: paymentMethods.merchantName
|
|
1556
|
-
}
|
|
1569
|
+
},
|
|
1570
|
+
onSubmit: handleOnSubmit
|
|
1557
1571
|
};
|
|
1558
1572
|
applePayRef.current = new import_adyen_web3.ApplePay(adyenCardRef.current, applePayConfiguration);
|
|
1559
1573
|
applePayRef.current.isAvailable().then(() => {
|
package/dist/index.mjs
CHANGED
|
@@ -1342,10 +1342,14 @@ function GooglePayComponent({ configuration, paymentMethods }) {
|
|
|
1342
1342
|
currency: paymentMethods.currency
|
|
1343
1343
|
},
|
|
1344
1344
|
onError: handleOnError,
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1345
|
+
onPaymentCompleted: (data, _) => {
|
|
1346
|
+
console.log("Adyen Payment completed", data);
|
|
1347
|
+
configuration.onPaymentCompleted?.();
|
|
1348
|
+
},
|
|
1349
|
+
onPaymentFailed: (data, _) => {
|
|
1350
|
+
console.log("Adyen Payment failed", data);
|
|
1351
|
+
configuration.onPaymentFailed?.();
|
|
1352
|
+
}
|
|
1349
1353
|
});
|
|
1350
1354
|
const gpayConfig = paymentMethods.paymentMethods.paymentMethods.find((x) => x.type === "googlepay").configuration;
|
|
1351
1355
|
const googlePayConfiguration = {
|
|
@@ -1355,6 +1359,16 @@ function GooglePayComponent({ configuration, paymentMethods }) {
|
|
|
1355
1359
|
},
|
|
1356
1360
|
countryCode: "IS",
|
|
1357
1361
|
environment: configuration.environment,
|
|
1362
|
+
onSubmit: handleOnSubmit,
|
|
1363
|
+
onAdditionalDetails: handleOnSubmitAdditionalData,
|
|
1364
|
+
onPaymentCompleted: (data, _) => {
|
|
1365
|
+
console.log("GooglePay Payment completed", data);
|
|
1366
|
+
configuration.onPaymentCompleted?.();
|
|
1367
|
+
},
|
|
1368
|
+
onPaymentFailed: (data, _) => {
|
|
1369
|
+
console.log("GooglePay Payment failed", data);
|
|
1370
|
+
configuration.onPaymentFailed?.();
|
|
1371
|
+
},
|
|
1358
1372
|
configuration: {
|
|
1359
1373
|
...gpayConfig,
|
|
1360
1374
|
merchantName: paymentMethods.merchantName
|
|
@@ -1520,9 +1534,8 @@ function ApplePayComponent({ configuration, paymentMethods }) {
|
|
|
1520
1534
|
value: paymentMethods.minorUnitsAmount,
|
|
1521
1535
|
currency: paymentMethods.currency
|
|
1522
1536
|
},
|
|
1523
|
-
onError: handleOnError,
|
|
1524
|
-
onSubmit: handleOnSubmit,
|
|
1525
1537
|
onAdditionalDetails: handleOnSubmitAdditionalData,
|
|
1538
|
+
onError: handleOnError,
|
|
1526
1539
|
onPaymentCompleted: configuration.onPaymentCompleted,
|
|
1527
1540
|
onPaymentFailed: configuration.onPaymentFailed
|
|
1528
1541
|
});
|
|
@@ -1536,7 +1549,8 @@ function ApplePayComponent({ configuration, paymentMethods }) {
|
|
|
1536
1549
|
configuration: {
|
|
1537
1550
|
...apayConfig,
|
|
1538
1551
|
merchantName: paymentMethods.merchantName
|
|
1539
|
-
}
|
|
1552
|
+
},
|
|
1553
|
+
onSubmit: handleOnSubmit
|
|
1540
1554
|
};
|
|
1541
1555
|
applePayRef.current = new ApplePay(adyenCardRef.current, applePayConfiguration);
|
|
1542
1556
|
applePayRef.current.isAvailable().then(() => {
|