straumur-web-component 0.3.7 → 0.4.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/index.cjs CHANGED
@@ -1362,14 +1362,9 @@ function GooglePayComponent({ configuration, paymentMethods }) {
1362
1362
  currency: paymentMethods.currency
1363
1363
  },
1364
1364
  onError: handleOnError,
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
- }
1365
+ onAdditionalDetails: handleOnSubmitAdditionalData,
1366
+ onPaymentCompleted: configuration.onPaymentCompleted,
1367
+ onPaymentFailed: configuration.onPaymentFailed
1373
1368
  });
1374
1369
  const gpayConfig = paymentMethods.paymentMethods.paymentMethods.find((x) => x.type === "googlepay").configuration;
1375
1370
  const googlePayConfiguration = {
@@ -1380,15 +1375,6 @@ function GooglePayComponent({ configuration, paymentMethods }) {
1380
1375
  countryCode: "IS",
1381
1376
  environment: configuration.environment,
1382
1377
  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
- },
1392
1378
  configuration: {
1393
1379
  ...gpayConfig,
1394
1380
  merchantName: paymentMethods.merchantName
@@ -1551,8 +1537,8 @@ function ApplePayComponent({ configuration, paymentMethods }) {
1551
1537
  value: paymentMethods.minorUnitsAmount,
1552
1538
  currency: paymentMethods.currency
1553
1539
  },
1554
- onAdditionalDetails: handleOnSubmitAdditionalData,
1555
1540
  onError: handleOnError,
1541
+ onAdditionalDetails: handleOnSubmitAdditionalData,
1556
1542
  onPaymentCompleted: configuration.onPaymentCompleted,
1557
1543
  onPaymentFailed: configuration.onPaymentFailed
1558
1544
  });
@@ -1563,11 +1549,11 @@ function ApplePayComponent({ configuration, paymentMethods }) {
1563
1549
  currency: paymentMethods.currency
1564
1550
  },
1565
1551
  environment: configuration.environment,
1552
+ onSubmit: handleOnSubmit,
1566
1553
  configuration: {
1567
1554
  ...apayConfig,
1568
1555
  merchantName: paymentMethods.merchantName
1569
- },
1570
- onSubmit: handleOnSubmit
1556
+ }
1571
1557
  };
1572
1558
  applePayRef.current = new import_adyen_web3.ApplePay(adyenCardRef.current, applePayConfiguration);
1573
1559
  applePayRef.current.isAvailable().then(() => {
package/dist/index.mjs CHANGED
@@ -1342,14 +1342,9 @@ function GooglePayComponent({ configuration, paymentMethods }) {
1342
1342
  currency: paymentMethods.currency
1343
1343
  },
1344
1344
  onError: handleOnError,
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
- }
1345
+ onAdditionalDetails: handleOnSubmitAdditionalData,
1346
+ onPaymentCompleted: configuration.onPaymentCompleted,
1347
+ onPaymentFailed: configuration.onPaymentFailed
1353
1348
  });
1354
1349
  const gpayConfig = paymentMethods.paymentMethods.paymentMethods.find((x) => x.type === "googlepay").configuration;
1355
1350
  const googlePayConfiguration = {
@@ -1360,15 +1355,6 @@ function GooglePayComponent({ configuration, paymentMethods }) {
1360
1355
  countryCode: "IS",
1361
1356
  environment: configuration.environment,
1362
1357
  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
- },
1372
1358
  configuration: {
1373
1359
  ...gpayConfig,
1374
1360
  merchantName: paymentMethods.merchantName
@@ -1534,8 +1520,8 @@ function ApplePayComponent({ configuration, paymentMethods }) {
1534
1520
  value: paymentMethods.minorUnitsAmount,
1535
1521
  currency: paymentMethods.currency
1536
1522
  },
1537
- onAdditionalDetails: handleOnSubmitAdditionalData,
1538
1523
  onError: handleOnError,
1524
+ onAdditionalDetails: handleOnSubmitAdditionalData,
1539
1525
  onPaymentCompleted: configuration.onPaymentCompleted,
1540
1526
  onPaymentFailed: configuration.onPaymentFailed
1541
1527
  });
@@ -1546,11 +1532,11 @@ function ApplePayComponent({ configuration, paymentMethods }) {
1546
1532
  currency: paymentMethods.currency
1547
1533
  },
1548
1534
  environment: configuration.environment,
1535
+ onSubmit: handleOnSubmit,
1549
1536
  configuration: {
1550
1537
  ...apayConfig,
1551
1538
  merchantName: paymentMethods.merchantName
1552
- },
1553
- onSubmit: handleOnSubmit
1539
+ }
1554
1540
  };
1555
1541
  applePayRef.current = new ApplePay(adyenCardRef.current, applePayConfiguration);
1556
1542
  applePayRef.current.isAvailable().then(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "straumur-web-component",
3
- "version": "0.3.7",
3
+ "version": "0.4.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://docs.straumur.is",
6
6
  "type": "module",