@paydock/client-sdk 1.111.1 → 1.113.2-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.
Files changed (35) hide show
  1. package/README.md +39 -0
  2. package/bundles/index.cjs +345 -307
  3. package/bundles/index.cjs.d.ts +4 -0
  4. package/bundles/index.mjs +345 -307
  5. package/bundles/index.mjs.d.ts +4 -0
  6. package/bundles/types/api/api-base.d.ts.map +1 -1
  7. package/bundles/types/api/api-checkout-internal.d.ts +1 -0
  8. package/bundles/types/api/api-checkout-internal.d.ts.map +1 -1
  9. package/bundles/types/checkout/checkout.d.ts.map +1 -1
  10. package/bundles/types/checkout/instructions/v1/instruction.apple_pay_form.show.d.ts.map +1 -1
  11. package/bundles/types/checkout/instructions/v1/instruction.canvas_3ds.show.d.ts.map +1 -1
  12. package/bundles/types/checkout/instructions/v1/instruction.google_pay_form.show.d.ts.map +1 -1
  13. package/bundles/types/checkout/instructions/v1/instruction.paypal_form.show.d.ts.map +1 -1
  14. package/bundles/types/checkout/layout-widgets/additionals.d.ts +1 -1
  15. package/bundles/types/checkout/layout-widgets/additionals.d.ts.map +1 -1
  16. package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts +3 -0
  17. package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts.map +1 -1
  18. package/bundles/types/checkout/layout-widgets/payment-template.d.ts +1 -1
  19. package/bundles/types/components/iframe-event.d.ts +2 -0
  20. package/bundles/types/components/iframe-event.d.ts.map +1 -1
  21. package/bundles/types/index-cba.d.ts +1 -0
  22. package/bundles/types/index-cba.d.ts.map +1 -1
  23. package/bundles/types/secure-remote-commerce/index.d.ts +1 -0
  24. package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
  25. package/bundles/types/secure-remote-commerce/interfaces.d.ts +12 -2
  26. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -1
  27. package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -1
  28. package/bundles/widget.umd.js +345 -307
  29. package/bundles/widget.umd.js.d.ts +4 -0
  30. package/bundles/widget.umd.js.min.d.ts +4 -0
  31. package/bundles/widget.umd.min.js +7 -7
  32. package/docs/click-to-pay-examples.md +36 -0
  33. package/docs/click-to-pay.md +3 -0
  34. package/package.json +66 -66
  35. package/slate.md +36 -0
package/README.md CHANGED
@@ -7627,6 +7627,42 @@ src.setStyles({
7627
7627
  });
7628
7628
  ```
7629
7629
 
7630
+ ## Recognition token
7631
+
7632
+ In order to store user information for further payments, click to pay provides a recognition token that is used to load user information.
7633
+ If you already have a recognitionToken stored, you can use it in meta to load the user information.
7634
+
7635
+ ### Storage suggestions
7636
+ Merchant can store the tokens by dropping the token as a 1st party cookie in the browser, and must ensure to manage all the security aspects around dropping/storing the cookie by following the security standards:
7637
+
7638
+ - `Expiration Date=` cookie should be set to expire at a max 180 days
7639
+ - `Secure` flag
7640
+ - `httpOnly` flag
7641
+ - `sameSite=` strict
7642
+ - `Value=` recognition token JWT
7643
+
7644
+ ### Example code
7645
+
7646
+ ```javascript
7647
+ var src = new paydock.ClickToPay(
7648
+ "#checkoutIframe",
7649
+ "service_id",
7650
+ "paydock_public_key",
7651
+ {
7652
+ "recognition_token": "eyJraWQiOiIy...",
7653
+ },
7654
+ );
7655
+ src.on('recognitionTokenRequested', (data) => {
7656
+ console.log('Recognition token was found: ' + data.data.recognitionToken);
7657
+ // Add recognition token to your store
7658
+ });
7659
+
7660
+ src.on('recognitionTokenDropped', () => {
7661
+ console.log('Recognition token was droped');
7662
+ // Delete recognition token from your store
7663
+ });
7664
+ ```
7665
+
7630
7666
  ## Classes
7631
7667
 
7632
7668
  <dl>
@@ -7707,6 +7743,7 @@ Interface of data used for the Mastercard Checkout. For further information refe
7707
7743
  | [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). |
7708
7744
  | [customer.phone.phone] | <code>string</code> | Customer phone number. |
7709
7745
  | [unaccepted_card_type] | <code>string</code> | Used to block a specific card type. Options are 'CREDIT', 'DEBIT'. |
7746
+ | [recognition_token] | <code>string</code> | Used for Click to Pay to load user information and preferences. |
7710
7747
 
7711
7748
  <a name="EventData" id="EventData" href="#EventData">&nbsp;</a>
7712
7749
 
@@ -7949,6 +7986,8 @@ List of available event's name in the Click To Pay checkout lifecycle
7949
7986
  | CHECKOUT_POPUP_CLOSE | <code>string</code> | <code>&quot;checkoutPopupClose&quot;</code> | Event sent when Click To Pay checkout flow is closed, regardless of embedded or windowed mode. |
7950
7987
  | CHECKOUT_COMPLETED | <code>string</code> | <code>&quot;checkoutCompleted&quot;</code> | Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information. |
7951
7988
  | CHECKOUT_ERROR | <code>string</code> | <code>&quot;checkoutError&quot;</code> | Event sent on error checkout by customer. Check [data](#EventData) for more information. |
7989
+ | RECOGNITION_TOKEN_REQUESTED | <code>string</code> | <code>&quot;recognitionTokenRequested&quot;</code> | Event sent when a recognition token was found on the mastercard SDK response. |
7990
+ | RECOGNITION_TOKEN_DROPPED | <code>string</code> | <code>&quot;recognitionTokenDropped&quot;</code> | Event sent when a recognition token needs to be dropped for user be no longer remembered. |
7952
7991
 
7953
7992
  <a name="EVENT_DATA_TYPE" id="EVENT_DATA_TYPE" href="#EVENT_DATA_TYPE">&nbsp;</a>
7954
7993