@paydock/client-sdk 1.10.58-beta → 1.10.72-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/slate.md CHANGED
@@ -829,6 +829,57 @@ This example shows how you can use a lot of other methods to settings your form
829
829
  </html>
830
830
  ```
831
831
 
832
+ ## Canvas 3ds for Standalone 3ds charges
833
+
834
+ After you initialized the 3ds charge via `v1/charges/standalone-3ds` API endpoint, you get a token used to initialized the Canvas3ds. All above information regarding setup, loading and initialization still apply.
835
+
836
+ ### Full example
837
+
838
+ ```html
839
+ <!DOCTYPE html>
840
+ <html lang="en">
841
+ <head>
842
+ <meta charset="UTF-8" />
843
+ <title>Title</title>
844
+ <style>
845
+ iframe {
846
+ border: 0;
847
+ width: 40%;
848
+ height: 450px;
849
+ }
850
+ </style>
851
+ </head>
852
+ <body>
853
+ <div id="widget3ds"></div>
854
+ <script src="https://app-sandbox.paydock.com/v1/widget.umd.js"></script>
855
+ <script>
856
+ var canvas3ds = new paydock.Canvas3ds("#widget3ds", "token");
857
+ canvas3ds.on("chargeAuthSuccess", function (data) {
858
+ console.log(data);
859
+ });
860
+ canvas3ds.on("chargeAuthReject", function (data) {
861
+ console.log(data);
862
+ });
863
+ canvas3ds.on("chargeAuthChallenge", function (data) {
864
+ console.log(data);
865
+ });
866
+ canvas3ds.on("chargeAuthDecoupled", function (data) {
867
+ console.log(data.result.description);
868
+ });
869
+ canvas3ds.on("error", function ({ charge_3ds_id, error }) {
870
+ console.log(error);
871
+ });
872
+ canvas3ds.load();
873
+ </script>
874
+ </body>
875
+ </html>
876
+ ```
877
+
878
+ **The chargeAuthSuccess event is executed both for frictionless flow, or for challenge flow after the customer has correctly authenticated with the bank using whatever challenge imposed.**
879
+ **The chargeAuthChallenge event is sent before starting a challenge flow (i.e. opening an IFrame for the customer to complete a challenge with ther bank)**
880
+ **The chargeAuthDecoupled event is sent when the flow is a decoupled challenge, alongside a `data.result.description` field that you must show to the customer, indicating the method the user must use to authenticate. For example this may happen by having the cardholder authenticating directly with their banking app through biometrics. Once the end customer does this, the Canvas3ds will be able to recognize the challenge result is ready and will either produce a chargeAuthSuccess or chargeAuthReject event**
881
+ **The error event is sent if an unexpected issue with the client library occurs. In such scenarios, you should consider the autentication process as interrupted**
882
+
832
883
  ## Vault Display Widget
833
884
  You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#vault-display-widget)
834
885