@paydock/client-sdk 1.103.11-beta → 1.103.24-beta
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/README.md +266 -444
- package/bundles/widget.umd.js +303 -646
- package/bundles/widget.umd.min.js +1 -1
- package/lib/api/api-service-internal.d.ts +2 -1
- package/lib/api/api-service-internal.js +1 -0
- package/lib/api/api-service-internal.js.map +1 -1
- package/lib/components/container.d.ts +0 -1
- package/lib/components/container.js +0 -3
- package/lib/components/container.js.map +1 -1
- package/lib/components/iframe-event.d.ts +2 -0
- package/lib/components/iframe-event.js +2 -0
- package/lib/components/iframe-event.js.map +1 -1
- package/lib/components/link.d.ts +3 -2
- package/lib/components/link.js +1 -0
- package/lib/components/link.js.map +1 -1
- package/lib/components/param.d.ts +2 -2
- package/lib/components/param.js.map +1 -1
- package/lib/components/wallet-background.d.ts +1 -2
- package/lib/components/wallet-background.js +1 -4
- package/lib/components/wallet-background.js.map +1 -1
- package/lib/configs/env/env.d.ts +3 -0
- package/lib/configs/env/env.js +9 -0
- package/lib/configs/env/env.js.map +1 -1
- package/lib/configs/sdk.js +1 -1
- package/lib/secure-remote-commerce/index.d.ts +102 -1
- package/lib/secure-remote-commerce/index.js +102 -1
- package/lib/secure-remote-commerce/index.js.map +1 -1
- package/lib/secure-remote-commerce/interfaces.d.ts +109 -32
- package/lib/secure-remote-commerce/interfaces.js +31 -11
- package/lib/secure-remote-commerce/interfaces.js.map +1 -1
- package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +30 -0
- package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js +39 -0
- package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js.map +1 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/index.d.ts +1 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/index.js +2 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/index.js.map +1 -0
- package/lib/secure-remote-commerce/providers/{visa-src/visa-src.d.ts → mastercard-src/mastercard-src.d.ts} +4 -7
- package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js +88 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js.map +1 -0
- package/lib/secure-remote-commerce/secure-remote-commerce.d.ts +13 -91
- package/lib/secure-remote-commerce/secure-remote-commerce.js +15 -98
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -1
- package/lib/wallet-buttons/apple.wallet-service.d.ts +0 -2
- package/lib/wallet-buttons/apple.wallet-service.js +5 -38
- package/lib/wallet-buttons/apple.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/flypay-v2.wallet-service.d.ts +1 -9
- package/lib/wallet-buttons/flypay-v2.wallet-service.js +132 -105
- package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/google.wallet-service.d.ts +0 -3
- package/lib/wallet-buttons/google.wallet-service.js +8 -41
- package/lib/wallet-buttons/google.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/index.d.ts +0 -126
- package/lib/wallet-buttons/index.js +0 -126
- package/lib/wallet-buttons/index.js.map +1 -1
- package/lib/wallet-buttons/interfaces.d.ts +0 -3
- package/lib/wallet-buttons/paypal.wallet-service.js +2 -17
- package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/wallet-buttons.d.ts +120 -62
- package/lib/wallet-buttons/wallet-buttons.js +60 -84
- package/lib/wallet-buttons/wallet-buttons.js.map +1 -1
- package/lib/wallet-buttons/wallet-service.d.ts +0 -7
- package/lib/wallet-buttons/wallet-service.js +0 -11
- package/lib/wallet-buttons/wallet-service.js.map +1 -1
- package/package.json +1 -1
- package/slate.md +78 -132
- package/lib/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -7
- package/lib/secure-remote-commerce/providers/visa-src/helper.js +0 -36
- package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.js +0 -2
- package/lib/secure-remote-commerce/providers/visa-src/index.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +0 -113
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -8
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +0 -10
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +0 -1
- package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +0 -3
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js +0 -151
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +0 -1
package/slate.md
CHANGED
|
@@ -1206,14 +1206,6 @@ In some situations you may want to forcibly close the checkout so that your user
|
|
|
1206
1206
|
button.close();
|
|
1207
1207
|
```
|
|
1208
1208
|
|
|
1209
|
-
### Performing actions when the wallet button is clicked
|
|
1210
|
-
|
|
1211
|
-
In some situations you may want to perform some validations or actions when the user clicks on the wallet button, for which you can use this method. Currently supported by Paypal, ApplePay and GooglePay wallets.
|
|
1212
|
-
|
|
1213
|
-
```javascript
|
|
1214
|
-
button.onClick(() => console.log("Perform actions on button click"));
|
|
1215
|
-
```
|
|
1216
|
-
|
|
1217
1209
|
### Performing actions when shipping info is updated
|
|
1218
1210
|
|
|
1219
1211
|
In Flypay, Paypal, ApplePay via MPGS and GooglePay via MPGS integrations after each shipping info update the `onUpdate(data)` will be called with the selected shipping address information, plus selected shipping method when applicable for Paypal, ApplePay and GooglePay. Merchants should handle this callback, recalculate shipping costs in their server by analyzing the new data, and submit a backend to backend request to `POST charges/:id` with the new total amount and shipping amount (you can find the documentation of this call in the PayDock API documentation).
|
|
@@ -1341,51 +1333,30 @@ _(Required `meta` fields: - . Optional `meta` fields: `request_shipping`, `pay_l
|
|
|
1341
1333
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
1342
1334
|
<script>
|
|
1343
1335
|
let button = new paydock.WalletButtons(
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1336
|
+
"#widget",
|
|
1337
|
+
charge_token,
|
|
1338
|
+
{
|
|
1339
|
+
request_shipping: true,
|
|
1340
|
+
pay_later: true,
|
|
1341
|
+
standalone: false,
|
|
1342
|
+
style: {
|
|
1343
|
+
layout: 'horizontal',
|
|
1344
|
+
color: 'blue',
|
|
1345
|
+
shape: 'rect',
|
|
1346
|
+
label: 'paypal',
|
|
1347
|
+
},
|
|
1348
|
+
}
|
|
1349
|
+
);
|
|
1358
1350
|
button.setEnv('sandbox');
|
|
1359
1351
|
button.onUnavailable(() => console.log("No wallet buttons available"));
|
|
1360
1352
|
button.onUpdate((data) => {
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1353
|
+
console.log("Updating amount via a backend to backend call to POST charges/:id");
|
|
1354
|
+
// call `POST charges/:id` to modify charge
|
|
1355
|
+
button.update({ success: true });
|
|
1356
|
+
});
|
|
1365
1357
|
button.onPaymentSuccessful((data) => console.log("The payment was successful"));
|
|
1366
1358
|
button.onPaymentError((data) => console.log("The payment was not successful"));
|
|
1367
1359
|
button.onPaymentInReview((data) => console.log("The payment is on fraud review"));
|
|
1368
|
-
|
|
1369
|
-
// Example 1: Asynchronous onClick handler
|
|
1370
|
-
const asyncLogic = async () => {
|
|
1371
|
-
// Perform asynchronous logic. Expectation is that a Promise is returned and attached to response via `attachResult`,
|
|
1372
|
-
// and resolve or reject of it will dictate how wallet behaves.
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
button.onClick(({ data: { attachResult } }) => {
|
|
1376
|
-
// Promise is attached to the result. On Paypal, when promise is resolved, the user Journey will continue.
|
|
1377
|
-
// If no promise is attached then the Paypal journey will not depend on the promise being resolved or rejected
|
|
1378
|
-
attachResult(asyncLogic());
|
|
1379
|
-
});
|
|
1380
|
-
|
|
1381
|
-
// Example 2: Synchronous onClick handler
|
|
1382
|
-
// button.onClick(({ data: { attachResult } }) => {
|
|
1383
|
-
// // Perform synchronous logic
|
|
1384
|
-
// console.log("Synchronous onClick: Button clicked");
|
|
1385
|
-
// // Optionally return a boolean flag to halt the operation
|
|
1386
|
-
// attachResult(false);
|
|
1387
|
-
// });
|
|
1388
|
-
|
|
1389
1360
|
button.load();
|
|
1390
1361
|
</script>
|
|
1391
1362
|
</html>
|
|
@@ -1519,7 +1490,6 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
|
|
|
1519
1490
|
button.onUnavailable(() => console.log("No wallet buttons available"));
|
|
1520
1491
|
button.onPaymentSuccessful((data) => console.log("The payment was successful"));
|
|
1521
1492
|
button.onPaymentError((data) => console.log("The payment was not successful"));
|
|
1522
|
-
button.onClick(() => console.log("On WalletButton Click"));
|
|
1523
1493
|
button.onUpdate((data) => {
|
|
1524
1494
|
console.log("Updating amount via a backend to backend call to POST charges/:id");
|
|
1525
1495
|
// call `POST charges/:id` to modify charge
|
|
@@ -1552,6 +1522,7 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
|
|
|
1552
1522
|
Also, for **ApplePay via MPGS** you can initialize the `ApplePayPaymentRequest` with your own values instead of using the default ones. Below you can see an example on how to initialize the `ApplePayPaymentRequest` with the `raw_data_initialization` meta field.
|
|
1553
1523
|
|
|
1554
1524
|
Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpecification` with your own values instead of using the default ones. Below you can see an example on how to initialize the `PaymentMethodSpecification` with the `raw_data_initialization` meta field.
|
|
1525
|
+
|
|
1555
1526
|
### ApplePay and GooglePay via MPGS Raw data initialization example
|
|
1556
1527
|
|
|
1557
1528
|
```html
|
|
@@ -1667,26 +1638,22 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
|
|
|
1667
1638
|
## Secure Remote Commerce
|
|
1668
1639
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
|
|
1669
1640
|
|
|
1670
|
-
This widget provides you with the ability to easily integrate with
|
|
1641
|
+
This widget provides you with the ability to easily integrate with Mastercard SRC.
|
|
1671
1642
|
|
|
1672
1643
|
## SRC simple example
|
|
1673
1644
|
|
|
1674
1645
|
### Container
|
|
1646
|
+
To integrate the SRC checkout iFrame you first need to create a container within your HTML code. This container will serve as the placeholder for the iFrame.
|
|
1675
1647
|
|
|
1676
1648
|
```html
|
|
1677
|
-
<div id="checkoutButton"></div>
|
|
1678
1649
|
<div id="checkoutIframe"></div>
|
|
1679
1650
|
```
|
|
1680
1651
|
|
|
1681
|
-
You must create a container for the initial checkout button, and a different one for the checkout iFrame. Inside the first tag the button will be initialized, and inside the second one the iFrame will be loaded once the button is clicked.
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
1652
|
### Initialization
|
|
1685
1653
|
```javascript
|
|
1686
|
-
var src = new paydock.
|
|
1687
|
-
"#checkoutButton",
|
|
1654
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
1688
1655
|
"#checkoutIframe",
|
|
1689
|
-
"
|
|
1656
|
+
"service_id",
|
|
1690
1657
|
"paydock_public_key_or_access_token",
|
|
1691
1658
|
{}, // meta
|
|
1692
1659
|
);
|
|
@@ -1696,19 +1663,18 @@ src.load();
|
|
|
1696
1663
|
```javascript--es2015
|
|
1697
1664
|
// ES2015 | TypeScript
|
|
1698
1665
|
|
|
1699
|
-
import {
|
|
1666
|
+
import { MastercardSRCClickToPay } from '@paydock/client-sdk';
|
|
1700
1667
|
|
|
1701
|
-
var src = new
|
|
1702
|
-
"#checkoutButton",
|
|
1668
|
+
var src = new MastercardSRCClickToPay(
|
|
1703
1669
|
"#checkoutIframe",
|
|
1704
|
-
"
|
|
1670
|
+
"service_id",
|
|
1705
1671
|
"paydock_public_key_or_access_token",
|
|
1706
1672
|
{}, // meta
|
|
1707
1673
|
);
|
|
1708
1674
|
src.load();
|
|
1709
1675
|
```
|
|
1710
1676
|
|
|
1711
|
-
*NOTE:* it's highly recommended to use a Paydock Access Token instead of the public key for security reasons. When creating it, you will need to enable the `Secure Remote Commerce` and add a
|
|
1677
|
+
*NOTE:* it's highly recommended to use a Paydock Access Token instead of the public key for security reasons in production environments. When creating it, you will need to enable the `Secure Remote Commerce` and add a whitelist for the domain of your checkout screen.
|
|
1712
1678
|
|
|
1713
1679
|
### Full example
|
|
1714
1680
|
|
|
@@ -1721,14 +1687,12 @@ src.load();
|
|
|
1721
1687
|
<style>iframe {border: 0;width: 40%;height: 300px;}</style>
|
|
1722
1688
|
</head>
|
|
1723
1689
|
<body>
|
|
1724
|
-
<div id="checkoutButton"></div>
|
|
1725
1690
|
<div id="checkoutIframe"></div>
|
|
1726
1691
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
1727
1692
|
<script>
|
|
1728
|
-
var src = new paydock.
|
|
1729
|
-
"#checkoutButton",
|
|
1693
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
1730
1694
|
"#checkoutIframe",
|
|
1731
|
-
"
|
|
1695
|
+
"service_id",
|
|
1732
1696
|
"paydock_public_key_or_access_token",
|
|
1733
1697
|
{},
|
|
1734
1698
|
);
|
|
@@ -1744,25 +1708,12 @@ src.load();
|
|
|
1744
1708
|
### Settings
|
|
1745
1709
|
|
|
1746
1710
|
```javascript
|
|
1747
|
-
|
|
1748
|
-
src.setEnv('sandbox'); // set enviroment
|
|
1749
|
-
|
|
1750
|
-
src.hideButton(); // hide button
|
|
1751
|
-
|
|
1752
|
-
src.showButton(); // show button
|
|
1711
|
+
src.setEnv('sandbox'); // set environment
|
|
1753
1712
|
|
|
1754
1713
|
src.hideCheckout(); // hide checkout iframe
|
|
1755
1714
|
|
|
1756
1715
|
src.showCheckout(); // show checkout iframe
|
|
1757
1716
|
|
|
1758
|
-
src.on('checkoutButtonLoaded', () => {
|
|
1759
|
-
console.log("Button loaded");
|
|
1760
|
-
});
|
|
1761
|
-
|
|
1762
|
-
src.on('checkoutButtonClicked', () => {
|
|
1763
|
-
console.log("Button clicked");
|
|
1764
|
-
});
|
|
1765
|
-
|
|
1766
1717
|
src.on('iframeLoaded', () => {
|
|
1767
1718
|
console.log("Initial iframe loaded");
|
|
1768
1719
|
});
|
|
@@ -1793,18 +1744,20 @@ Here you can see how you can use this methods to customize your checkout experie
|
|
|
1793
1744
|
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
1794
1745
|
</head>
|
|
1795
1746
|
<body>
|
|
1796
|
-
<div id="checkoutButton"></div>
|
|
1797
1747
|
<div id="checkoutIframe"></div>
|
|
1798
1748
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
1799
1749
|
<script>
|
|
1800
|
-
var src = new paydock.
|
|
1801
|
-
"#checkoutButton",
|
|
1750
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
1802
1751
|
"#checkoutIframe",
|
|
1803
|
-
"
|
|
1752
|
+
"service_id",
|
|
1804
1753
|
"paydock_public_key_or_access_token",
|
|
1805
1754
|
{},
|
|
1806
1755
|
);
|
|
1807
1756
|
|
|
1757
|
+
src.on('iframeLoaded', () => {
|
|
1758
|
+
console.log("Initial iframe loaded");
|
|
1759
|
+
});
|
|
1760
|
+
|
|
1808
1761
|
src.on('checkoutReady', () => {
|
|
1809
1762
|
console.log("Checkout ready to be used");
|
|
1810
1763
|
});
|
|
@@ -1812,34 +1765,37 @@ Here you can see how you can use this methods to customize your checkout experie
|
|
|
1812
1765
|
src.on('checkoutCompleted', (token) => {
|
|
1813
1766
|
console.log(token);
|
|
1814
1767
|
});
|
|
1768
|
+
|
|
1769
|
+
src.on('checkoutError', (error) => {
|
|
1770
|
+
console.log(error);
|
|
1771
|
+
});
|
|
1772
|
+
|
|
1815
1773
|
src.load();
|
|
1816
1774
|
</script>
|
|
1817
1775
|
</body>
|
|
1818
1776
|
</html>
|
|
1819
1777
|
```
|
|
1820
1778
|
|
|
1821
|
-
## Customization options for address fields
|
|
1822
|
-
### Shipping address:
|
|
1779
|
+
## Customization options for billing address fields
|
|
1823
1780
|
|
|
1824
|
-
To customize
|
|
1781
|
+
To customize billing address experience we use a flag that manages how MastercardSRC requires or not billing address to the customer. Options are NONE (default option), POSTAL_COUNTRY or FULL.
|
|
1825
1782
|
|
|
1826
1783
|
```
|
|
1827
|
-
var src = new paydock.
|
|
1828
|
-
"#checkoutButton",
|
|
1784
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
1829
1785
|
"#checkoutIframe",
|
|
1830
|
-
"
|
|
1786
|
+
"service_id",
|
|
1831
1787
|
"paydock_public_key_or_access_token",
|
|
1832
1788
|
{
|
|
1833
1789
|
"dpa_transaction_options": {
|
|
1834
|
-
"
|
|
1790
|
+
"dpa_billing_preference": "FULL"
|
|
1835
1791
|
}
|
|
1836
1792
|
},
|
|
1837
1793
|
);
|
|
1838
1794
|
```
|
|
1839
1795
|
|
|
1840
|
-
With this the
|
|
1796
|
+
With this the SRC checkout will require the billing address from consumer and be returned as part of the checkout data. These information will be stored and leveraged in the Paydock charge as well.
|
|
1841
1797
|
|
|
1842
|
-
Another option is at time of creating the charge. Say that you have a different way of collecting the
|
|
1798
|
+
Another option is to provide it at the time of creating the charge. Say that you have a different way of collecting the billing address (outside SRC checkout), you can then disable the shipping address on our SRC widget and send it when creating the charge after getting the One Time Token out of the SRC widget, alongside other details that may have been collected outside the SRC checkout as the shipping address.
|
|
1843
1799
|
|
|
1844
1800
|
```
|
|
1845
1801
|
POST v1/charges
|
|
@@ -1847,10 +1803,16 @@ POST v1/charges
|
|
|
1847
1803
|
{
|
|
1848
1804
|
"amount": "10.00",
|
|
1849
1805
|
"currency": "AUD",
|
|
1850
|
-
"token": "
|
|
1806
|
+
"token": "one_time_token",
|
|
1851
1807
|
"customer": {
|
|
1852
1808
|
"payment_source": {
|
|
1853
|
-
"gateway_id": "gateway_id"
|
|
1809
|
+
"gateway_id": "gateway_id",
|
|
1810
|
+
"address_line1": "address_line1",
|
|
1811
|
+
"address_line2": "address_line2",
|
|
1812
|
+
"address_city": "address_city",
|
|
1813
|
+
"address_postcode": "address_postcode",
|
|
1814
|
+
"address_state": "address_state",
|
|
1815
|
+
"address_country": "address_country"
|
|
1854
1816
|
}
|
|
1855
1817
|
},
|
|
1856
1818
|
"shipping": {
|
|
@@ -1865,60 +1827,44 @@ POST v1/charges
|
|
|
1865
1827
|
}
|
|
1866
1828
|
```
|
|
1867
1829
|
|
|
1868
|
-
|
|
1830
|
+
## Customization options for accepted cards
|
|
1869
1831
|
|
|
1870
|
-
|
|
1832
|
+
To improve the experience in the use of the widget, it is allowed to send a flag `unaccepted_card_type` to block the usage of an specific card type. The available options are 'DEBIT' and 'CREDIT'.
|
|
1833
|
+
|
|
1834
|
+
### Example code
|
|
1871
1835
|
|
|
1872
1836
|
```
|
|
1873
|
-
var src = new paydock.
|
|
1874
|
-
"#checkoutButton",
|
|
1837
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
1875
1838
|
"#checkoutIframe",
|
|
1876
|
-
"
|
|
1877
|
-
"
|
|
1839
|
+
"service_id",
|
|
1840
|
+
"paydock_public_key",
|
|
1878
1841
|
{
|
|
1879
|
-
|
|
1880
|
-
"email": "test@email.com",
|
|
1881
|
-
"first_name": "Name",
|
|
1882
|
-
"last_name": "Surname",
|
|
1883
|
-
"phone": {
|
|
1884
|
-
"country_code": "1",
|
|
1885
|
-
"phone": "2124567890"
|
|
1886
|
-
},
|
|
1887
|
-
"payment_source": {
|
|
1888
|
-
"address_line1": "Line 1",
|
|
1889
|
-
"address_line2": "Line 2",
|
|
1890
|
-
"address_city": "Miami",
|
|
1891
|
-
"address_postcode": "33126",
|
|
1892
|
-
"address_state": "FL",
|
|
1893
|
-
"address_country": "US"
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1842
|
+
unaccepted_card_type: 'DEBIT'
|
|
1896
1843
|
},
|
|
1897
1844
|
);
|
|
1845
|
+
|
|
1898
1846
|
```
|
|
1899
1847
|
|
|
1900
|
-
## Personalization
|
|
1848
|
+
## Styling Personalization
|
|
1901
1849
|
|
|
1902
|
-
To improve the experience in the use of the widget, it is allowed to send props that customize the UI.
|
|
1850
|
+
To improve the experience in the use of the widget, it is allowed to send props that customize the UI look and feel.
|
|
1903
1851
|
|
|
1904
1852
|
### Example code
|
|
1905
1853
|
|
|
1906
1854
|
```
|
|
1907
|
-
var src = new paydock.
|
|
1908
|
-
"#checkoutButton",
|
|
1855
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
1909
1856
|
"#checkoutIframe",
|
|
1910
|
-
"
|
|
1857
|
+
"service_id",
|
|
1911
1858
|
"paydock_public_key",
|
|
1859
|
+
{},
|
|
1912
1860
|
);
|
|
1913
1861
|
|
|
1914
|
-
|
|
1915
|
-
|
|
1862
|
+
src.setStyles({
|
|
1863
|
+
enable_src_popup: true,
|
|
1864
|
+
primary_button_color: 'red',
|
|
1865
|
+
secondary_button_color: 'red',
|
|
1866
|
+
primary_button_text_color: 'red',
|
|
1867
|
+
secondary_button_text_color: 'red',
|
|
1868
|
+
font_family: 'Arial',
|
|
1869
|
+
});
|
|
1916
1870
|
```
|
|
1917
|
-
## Event and Values
|
|
1918
|
-
|
|
1919
|
-
| Event Value | Type | Description |
|
|
1920
|
-
| ------------------- | ------------------- | -------------------------------------------------------------- |
|
|
1921
|
-
| primary_color | <code>string</code> | HEX color for the principal buttons, example : #32a852 |
|
|
1922
|
-
| button_text_color | <code>string</code> | HEX color for the text of the buttons, example : #32a852|
|
|
1923
|
-
| font_family | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family)|
|
|
1924
|
-
| card_schemes | <code>[string] - array of string</code> | Possible values "visa", "mastercard", "amex" and "discover" - Default show all logos
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export const CARD_SCHEME = {
|
|
2
|
-
VISA: 'visa',
|
|
3
|
-
MASTERCARD: 'mastercard',
|
|
4
|
-
AMEX: 'amex',
|
|
5
|
-
DISCOVER: 'discover',
|
|
6
|
-
};
|
|
7
|
-
const CHEVRON_VMAD_IMG_PATH = '/images/visa-src/Chevron_Large_VMAD.png';
|
|
8
|
-
const CHEVRON_VMA_IMG_PATH = '/images/visa-src/Chevron_Large_VMA.png';
|
|
9
|
-
const CHEVRON_VM_IMG_PATH = '/images/visa-src/Chevron_Large_VM.png';
|
|
10
|
-
const CHEVRON_M_IMG_PATH = '/images/visa-src/Chevron_Large_M.png';
|
|
11
|
-
const CHEVRON_D_IMG_PATH = '/images/visa-src/Chevron_Large_D.png';
|
|
12
|
-
const CHEVRON_V_IMG_PATH = '/images/visa-src/Chevron_Large_V.png';
|
|
13
|
-
const VMAD_IMG_PATH = '/images/visa-src/vmad.svg';
|
|
14
|
-
const VMA_IMG_PATH = '/images/visa-src/logos/Networks_Large_VMA.png';
|
|
15
|
-
const VM_IMG_PATH = '/images/visa-src/logos/Networks_Large_VM.png';
|
|
16
|
-
const M_IMG_PATH = '/images/visa-src/logos/master-logo.png';
|
|
17
|
-
const D_IMG_PATH = '/images/visa-src/logos/Networks_Large_D.png';
|
|
18
|
-
const V_IMG_PATH = '/images/visa-src/logos/visa-logo.png';
|
|
19
|
-
export const GenerateCardSchemesLogo = (card_scheme, chevron = false) => {
|
|
20
|
-
if (!card_scheme || !Array.isArray(card_scheme))
|
|
21
|
-
return chevron ? CHEVRON_VMAD_IMG_PATH : VMAD_IMG_PATH;
|
|
22
|
-
const card_scheme_sort = card_scheme.sort();
|
|
23
|
-
if (includeArray([CARD_SCHEME.AMEX, CARD_SCHEME.MASTERCARD, CARD_SCHEME.VISA], card_scheme_sort))
|
|
24
|
-
return chevron ? CHEVRON_VMA_IMG_PATH : VMA_IMG_PATH;
|
|
25
|
-
if (includeArray([CARD_SCHEME.MASTERCARD, CARD_SCHEME.VISA], card_scheme_sort))
|
|
26
|
-
return chevron ? CHEVRON_VM_IMG_PATH : VM_IMG_PATH;
|
|
27
|
-
if (includeArray([CARD_SCHEME.MASTERCARD], card_scheme_sort))
|
|
28
|
-
return chevron ? CHEVRON_M_IMG_PATH : M_IMG_PATH;
|
|
29
|
-
if (includeArray([CARD_SCHEME.DISCOVER], card_scheme_sort))
|
|
30
|
-
return chevron ? CHEVRON_D_IMG_PATH : D_IMG_PATH;
|
|
31
|
-
if (includeArray([CARD_SCHEME.VISA], card_scheme_sort))
|
|
32
|
-
return chevron ? CHEVRON_V_IMG_PATH : V_IMG_PATH;
|
|
33
|
-
return chevron ? CHEVRON_V_IMG_PATH : VMAD_IMG_PATH;
|
|
34
|
-
};
|
|
35
|
-
const includeArray = (condition, card_scheme) => condition.every((card, index) => card === card_scheme[index]);
|
|
36
|
-
//# sourceMappingURL=../../../../src/lib/secure-remote-commerce/providers/visa-src/helper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../secure-remote-commerce/providers/visa-src/helper.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,YAAY;IACxB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACvB,CAAC;AAEF,MAAM,qBAAqB,GAAG,yCAAyC,CAAC;AACxE,MAAM,oBAAoB,GAAG,wCAAwC,CAAC;AACtE,MAAM,mBAAmB,GAAG,uCAAuC,CAAC;AACpE,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AAClE,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AAClE,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AAElE,MAAM,aAAa,GAAG,2BAA2B,CAAC;AAClD,MAAM,YAAY,GAAG,+CAA+C,CAAC;AACrE,MAAM,WAAW,GAAG,8CAA8C,CAAC;AACnE,MAAM,UAAU,GAAG,wCAAwC,CAAC;A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AkB,CAAC,CAAC,CAAC,aAAa,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,SAAmB,EAAE,WAAqB,EAAE,EAAE,CAChE,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { VisaSRC } from './visa-src';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../secure-remote-commerce/providers/visa-src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { Link, VISA_SRC } from '../../../components/link';
|
|
2
|
-
import { Container } from '../../../components/container';
|
|
3
|
-
import { IFrame } from '../../../components/iframe';
|
|
4
|
-
import { IFrameEvent } from '../../../components/iframe-event';
|
|
5
|
-
import { VisaSRCStyles } from "./visa-src.styles";
|
|
6
|
-
import { EVENT } from '../../interfaces';
|
|
7
|
-
import { GenerateCardSchemesLogo } from "./helper";
|
|
8
|
-
import { SDK } from '../../../configs/sdk';
|
|
9
|
-
export class VisaSRC {
|
|
10
|
-
constructor(button_selector, iframe_selector, service_id, public_key, meta, eventEmitter, autoResize, env, alias) {
|
|
11
|
-
this.meta = meta;
|
|
12
|
-
this.eventEmitter = eventEmitter;
|
|
13
|
-
this.autoResize = autoResize;
|
|
14
|
-
this.link = new Link(VISA_SRC);
|
|
15
|
-
this.link.setParams(Object.assign({ service_id, public_key }, meta && { meta: JSON.stringify(meta) }));
|
|
16
|
-
if (SDK.version) {
|
|
17
|
-
this.link.setParams({
|
|
18
|
-
sdk_version: SDK.version,
|
|
19
|
-
sdk_type: SDK.type,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
if (env)
|
|
23
|
-
this.link.setEnv(env, alias);
|
|
24
|
-
this.iFrameContainer = new Container(iframe_selector);
|
|
25
|
-
this.iFrame = new IFrame(this.iFrameContainer);
|
|
26
|
-
this.buttonContainer = new Container(button_selector);
|
|
27
|
-
this.iFrameEvent = new IFrameEvent(window);
|
|
28
|
-
this.setupIFrameEvents();
|
|
29
|
-
}
|
|
30
|
-
setupIFrameEvents() {
|
|
31
|
-
const widgetId = this.link.getParams().widget_id;
|
|
32
|
-
this.iFrameEvent.on(EVENT.CHECKOUT_READY, widgetId, ({ data }) => {
|
|
33
|
-
this.eventEmitter.emit(EVENT.CHECKOUT_READY, data);
|
|
34
|
-
});
|
|
35
|
-
this.iFrameEvent.on(EVENT.CHECKOUT_COMPLETED, widgetId, ({ data }) => {
|
|
36
|
-
this.eventEmitter.emit(EVENT.CHECKOUT_COMPLETED, data);
|
|
37
|
-
});
|
|
38
|
-
this.iFrameEvent.on(EVENT.CHECKOUT_ERROR, widgetId, ({ data }) => {
|
|
39
|
-
this.eventEmitter.emit(EVENT.CHECKOUT_ERROR, data);
|
|
40
|
-
});
|
|
41
|
-
if (this.autoResize)
|
|
42
|
-
this.useAutoResize(true);
|
|
43
|
-
}
|
|
44
|
-
load() {
|
|
45
|
-
var _a;
|
|
46
|
-
const container = document.createElement('div');
|
|
47
|
-
container.setAttribute('style', VisaSRCStyles.buttonContainerStyles);
|
|
48
|
-
const checkoutButton = document.createElement('button');
|
|
49
|
-
checkoutButton.setAttribute('style', VisaSRCStyles.buttonStyles);
|
|
50
|
-
if (this.meta.customizations.primary_color)
|
|
51
|
-
checkoutButton.style.backgroundColor = this.meta.customizations.primary_color;
|
|
52
|
-
if (this.meta.customizations.button_text_color)
|
|
53
|
-
checkoutButton.style.color = this.meta.customizations.button_text_color;
|
|
54
|
-
checkoutButton.innerHTML = 'Checkout';
|
|
55
|
-
const footerContainer = document.createElement('div');
|
|
56
|
-
footerContainer.setAttribute('style', VisaSRCStyles.footerContainerStyles);
|
|
57
|
-
const verticalLine = document.createElement('div');
|
|
58
|
-
verticalLine.setAttribute('style', VisaSRCStyles.verticalLineStyle);
|
|
59
|
-
const footerText = document.createElement('p');
|
|
60
|
-
footerText.setAttribute('style', VisaSRCStyles.footerTextStyles);
|
|
61
|
-
footerText.innerHTML = 'WE ACCEPT';
|
|
62
|
-
const clickToPayAllCards = document.createElement('img');
|
|
63
|
-
clickToPayAllCards.setAttribute('style', VisaSRCStyles.clickToPayAllCardsStyle);
|
|
64
|
-
clickToPayAllCards.src = this.link.getBaseUrl() + `${GenerateCardSchemesLogo((_a = this.meta.customizations) === null || _a === void 0 ? void 0 : _a.card_schemes, true)}`;
|
|
65
|
-
checkoutButton.onclick = () => {
|
|
66
|
-
this.eventEmitter.emit(EVENT.CHECKOUT_BUTTON_CLICKED, {});
|
|
67
|
-
this.iFrame.load(this.link.getUrl(), { title: 'Visa SRC checkout' });
|
|
68
|
-
this.iFrame.getElement().onload = () => this.eventEmitter.emit(EVENT.IFRAME_LOADED, {});
|
|
69
|
-
};
|
|
70
|
-
container.appendChild(checkoutButton);
|
|
71
|
-
container.appendChild(footerContainer);
|
|
72
|
-
footerContainer.appendChild(footerText);
|
|
73
|
-
footerContainer.appendChild(clickToPayAllCards);
|
|
74
|
-
this.buttonContainer.getElement().appendChild(container);
|
|
75
|
-
this.eventEmitter.emit(EVENT.CHECKOUT_BUTTON_LOADED, {});
|
|
76
|
-
}
|
|
77
|
-
getEnv() {
|
|
78
|
-
return this.link.getEnv();
|
|
79
|
-
}
|
|
80
|
-
hideButton(_saveSize) {
|
|
81
|
-
if (this.buttonContainer.getElement())
|
|
82
|
-
this.buttonContainer.getElement().style['display'] = 'none';
|
|
83
|
-
}
|
|
84
|
-
showButton() {
|
|
85
|
-
if (this.buttonContainer.getElement())
|
|
86
|
-
this.buttonContainer.getElement().style['display'] = 'block';
|
|
87
|
-
}
|
|
88
|
-
hideCheckout(saveSize) {
|
|
89
|
-
if (this.iFrame)
|
|
90
|
-
this.iFrame.hide();
|
|
91
|
-
}
|
|
92
|
-
showCheckout() {
|
|
93
|
-
if (this.iFrame)
|
|
94
|
-
this.iFrame.show();
|
|
95
|
-
}
|
|
96
|
-
reload() {
|
|
97
|
-
this.iFrame.remove();
|
|
98
|
-
this.load();
|
|
99
|
-
}
|
|
100
|
-
useAutoResize(force) {
|
|
101
|
-
if (this.autoResize && !force)
|
|
102
|
-
return;
|
|
103
|
-
this.autoResize = true;
|
|
104
|
-
this.iFrameEvent.on('resize', this.link.getParams().widget_id, ({ data }) => {
|
|
105
|
-
if (this.iFrame.getElement()) {
|
|
106
|
-
this.iFrame.getElement().scrolling = 'no';
|
|
107
|
-
if (data.height)
|
|
108
|
-
this.iFrame.setStyle('height', data.height + 'px');
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=../../../../src/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visa-src.js","sourceRoot":"","sources":["../../../../secure-remote-commerce/providers/visa-src/visa-src.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAc,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,KAAK,EAAgB,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,MAAM,OAAO,OAAO;IAOhB,YAAY,eAAuB,EAAE,eAAuB,EAAE,UAAkB,EAAE,UAAkB,EAAY,IAAkB,EAAY,YAA0B,EAAY,UAAU,EAAE,GAAW,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AC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAc,EAAE,EAAE;YACpF,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;gBAC1B,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC;gBAC1C,IAAI,IAAI,CAAC,MAAM;oBACX,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;aAC1D;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export class VisaSRCStyles {
|
|
2
|
-
}
|
|
3
|
-
VisaSRCStyles.buttonContainerStyles = "display: flex; flex-direction: column; justify-content: center; align-items: center;";
|
|
4
|
-
VisaSRCStyles.buttonStyles = "color: #ffff; background-color: #ffbe24; border: none; width: 100%; min-height: 40px; font-size: 16px; font-weight: bold; line-height: 19px; letter-spacing: 0.7px; text-transform: uppercase; border-radius: 4px; margin-bottom: 15px; cursor: pointer;";
|
|
5
|
-
VisaSRCStyles.footerContainerStyles = "display: flex; flex: 1; flex-wrap: wrap; justify-content: center;";
|
|
6
|
-
VisaSRCStyles.footerTextStyles = "text-align: center; color: #666666; margin: 2px 0;";
|
|
7
|
-
VisaSRCStyles.verticalLineStyle = "display: inline-block; padding: 0.5px; background-color: #E5E5E5; height: 15px;";
|
|
8
|
-
VisaSRCStyles.clickToPayAllCardsStyle = "height: 17px; margin-left: 8px; vertical-align: middle; padding-top: 3px;";
|
|
9
|
-
// TODO: Remind to add in docs that if merchant's div is smaller than 240px the button styles will broke
|
|
10
|
-
//# sourceMappingURL=../../../../src/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visa-src.styles.js","sourceRoot":"","sources":["../../../../secure-remote-commerce/providers/visa-src/visa-src.styles.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,aAAa;;AACR,mCAAqB,GAAG,sFAAsF,CAAC;AAE/G,0BAAY,GAAG,0PAA0P,CAAC;AAE1Q,mCAAqB,GAAG,mEAAmE,CAAC;AAE5F,8BAAgB,GAAG,oDAAoD,CAAC;AAExE,+BAAiB,GAAG,iFAAiF,CAAC;AAEtG,qCAAuB,GAAG,2EAA2E,CAAC;AAGxH,wGAAwG"}
|