From version 96.2
edited by Asbjørn Ulsberg
on 2018/02/21 12:31
To version 97.1
edited by Asbjørn Ulsberg
on 2018/02/21 12:31
Change comment: Renamed back-links.

Summary

Details

Page properties
Content
... ... @@ -13,7 +13,7 @@
13 13  
14 14  The simplest way to implement PayEx Checkout in your frontend is with the {{code}}data-payex-checkout{{/code}} attribute.
15 15  
16 -Choose the button you want to open the PayEx Checkout modal and add the attribute {{code}}data-payex-checkout{{/code}} with the value returned {{code}}paymentSessionUrl{{/code}} from the [[initial POST>>doc:Main.ECommerce.PayEx Checkout.WebHome||anchor="HStep1:Createpaymentsession"]]. Then add the {{code}}disable{{/code}} attribute - the PayEx Checkout script will enable it when it is properly loaded. The button should be wrapped inside a form that posts to your server.
16 +Choose the button you want to open the PayEx Checkout modal and add the attribute {{code}}data-payex-checkout{{/code}} with the value returned {{code}}paymentSessionUrl{{/code}} from the [[initial POST>>doc:Main.ecommerce.PayEx Checkout.WebHome||anchor="HStep1:Createpaymentsession"]]. Then add the {{code}}disable{{/code}} attribute - the PayEx Checkout script will enable it when it is properly loaded. The button should be wrapped inside a form that posts to your server.
17 17  
18 18  The PayEx Checkout script will submit the {{code}}<form>{{/code}} when the PayEx Checkout user flow is complete.
19 19  
... ... @@ -64,7 +64,7 @@
64 64  
65 65  If you have added it, start by removing the {{code}}data-payex-checkout{{/code}} attribute to prevent the PayEx Checkout script to open and post automatically.
66 66  
67 -You can open the checkout modal on demand with the {{code}}"open"{{/code}} argument and use the {{code}}onComplete{{/code}} callback to post to your server when the PayEx Checkout user flow is completed to continue with the [[Get Payment Status>>doc:Main.ECommerce.PayEx Checkout.WebHome||anchor="HStep4:Getpaymentstatus"]] step.
67 +You can open the checkout modal on demand with the {{code}}"open"{{/code}} argument and use the {{code}}onComplete{{/code}} callback to post to your server when the PayEx Checkout user flow is completed to continue with the [[Get Payment Status>>doc:Main.ecommerce.PayEx Checkout.WebHome||anchor="HStep4:Getpaymentstatus"]] step.
68 68  
69 69  Please note that Checkout must be opened with a [[trusted context>>https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted]] in order to prevent pop-up blockers. The code has a trusted context when it runs as result of an user action. Code running within async callbacks such as ajax and timeout loses trusted context, so make sure you have acquired a payment session url before the user click on your buy button.
70 70  
... ... @@ -93,7 +93,7 @@
93 93  |(% style="text-align:right; width:126px" %)(((
94 94  {{code}}paymentSessionUrl{{/code}}
95 95  (% style="color:LightGrey" %)string
96 -)))|(% style="width:1764px" %)A string of the URL to the Payment Session. This URL should be retrieved before page is rendered in the browser by completing the [[intial server-to-server POST request>>doc:Main.ECommerce.PayEx Checkout.WebHome||anchor="HStep1:Createpaymentsession"]].
96 +)))|(% style="width:1764px" %)A string of the URL to the Payment Session. This URL should be retrieved before page is rendered in the browser by completing the [[intial server-to-server POST request>>doc:Main.ecommerce.PayEx Checkout.WebHome||anchor="HStep1:Createpaymentsession"]].
97 97  |(% style="text-align:right; width:126px" %)(((
98 98  {{code}}options{{/code}}
99 99  (% style="color:LightGrey" %)object(%%)
... ... @@ -127,7 +127,7 @@
127 127  |(% style="text-align:right; width:126px" %)(((
128 128  {{code}}paymentSessionUrl{{/code}}
129 129  (% style="color:LightGrey" %)string
130 -)))|(% style="width:1764px" %)A string of the URL to the Payment Session. This URL should be retrieved before page is rendered in the browser by completing the [[intial server-to-server POST request>>doc:Main.ECommerce.PayEx Checkout.WebHome||anchor="HStep1:Createpaymentsession"]].
130 +)))|(% style="width:1764px" %)A string of the URL to the Payment Session. This URL should be retrieved before page is rendered in the browser by completing the [[intial server-to-server POST request>>doc:Main.ecommerce.PayEx Checkout.WebHome||anchor="HStep1:Createpaymentsession"]].
131 131  |(% style="text-align:right; width:126px" %)(((
132 132  {{code}}command{{/code}}
133 133  (% style="color:LightGrey" %)string(%%)
... ... @@ -144,7 +144,7 @@
144 144  payex.checkout("<payment_session_url>", "open");
145 145  {{/code}}
146 146  
147 -=== ===
147 +=== ===
148 148  
149 149  === payex.checkout(paymentSessionUrl, options, command) ===
150 150  
... ... @@ -156,7 +156,7 @@
156 156  |(% style="text-align:right; width:126px" %)(((
157 157  {{code}}paymentSessionUrl{{/code}}
158 158  (% style="color:LightGrey" %)string
159 -)))|(% style="width:1764px" %)A string of the URL to the Payment Session. This URL should be retrieved before page is rendered in the browser by completing the [[intial server-to-server POST request>>doc:Main.ECommerce.PayEx Checkout.WebHome||anchor="HStep1:Createpaymentsession"]].
159 +)))|(% style="width:1764px" %)A string of the URL to the Payment Session. This URL should be retrieved before page is rendered in the browser by completing the [[intial server-to-server POST request>>doc:Main.ecommerce.PayEx Checkout.WebHome||anchor="HStep1:Createpaymentsession"]].
160 160  |(% style="text-align:right; width:126px" %)(((
161 161  {{code}}options{{/code}}
162 162  (% style="color:LightGrey" %)object(%%)

Tips

You can click on the arrows next to the breadcrumb elements to quickly navigate to sibling and children pages.

Need help?

If you need help with XWiki you can contact: