From version 80.1
edited by Asbjørn Ulsberg
on 2018/02/26 09:42
To version 81.1
edited by Asbjørn Ulsberg
on 2018/04/27 09:49
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,12 +1,12 @@
1 1  An implementer must first perform a POST to this resource to initate the payment with an HTTP POST from your backend with payment info and your accessToken. The response from the POST will contain a payment session URL. Persist the paymentSessionUrl alongside the data representing the initial POST, be it a shopping cart, an order, or similar.
2 2  
3 -The paymentSessionUrl returned from the POST is the base URL to request all other resources related to the [[Payment>>Main.ecommerce.payex-checkout.Introduction.Payment.WebHome]].
3 +The paymentSessionUrl returned from the POST is the base URL to request all other resources related to the [[Payment>>ecommerce.PayEx Checkout.Payment]].
4 4  
5 5  = Create Payment Session =
6 6  
7 7  To create a Payment Session, you simply perform an HTTP {{code}}POST{{/code}} request with a Payment Session JSON payload as documented below to the Payment Session URL as discovered in the Home Resource.
8 8  
9 -This resource requires authentication as mentioned in the [[Intro>>Main.ecommerce.payex-checkout.Introduction.WebHome||anchor="HAuthentication"]].
9 +This resource requires authentication as mentioned in the [[introduction>>ecommerce.PayEx Checkout.Introduction||anchor="HAuthentication"]].
10 10  
11 11  == Properties ==
12 12  
... ... @@ -41,6 +41,11 @@
41 41  
42 42  The following currencies is supported by PayEx Checkout as of now: "NOK" & "SEK".
43 43  )))
44 +|(% style="text-align:right" %){{code}}hosts{{/code}}
45 +(% style="color:LightGrey" %)string[]
46 +(optional)|(((
47 +The host name(s) of the web site that includes the PayEx Checkout JavaScript and holds the button that PayEx Checkout will be initialized from. The host name(s) will be used by PayEx Checkout to verify the host it is initialized from, so unauthorized hosts won’t be able to open PayEx Checkout on behalf of other web sites.
48 +)))
44 44  |(% style="text-align:right" %){{code}}callbackUrl{{/code}}
45 45  (% style="color:LightGrey" %)string
46 46  (required)|The URL you want PayEx to perform HTTP {{code}}POST{{/code}} requests against (called callbacks) to when a Payment changes status. This URL **should** be unique per Payment Session and coupled to the order, shopping cart, or similar that you want to collect money for with PayEx Checkout.
... ... @@ -106,6 +106,7 @@
106 106   "reference": "merchant-order-123",
107 107   "acquire": ["email", "mobilePhoneNumber", "shippingAddress"],
108 108   "culture": "nb-NO",
114 + "hosts": ["https://merchant.com/"],
109 109   "payer": {
110 110   "email": "payer@example.com",
111 111   "mobilePhoneNumber": "+4712345678"
... ... @@ -148,13 +148,13 @@
148 148  
149 149  {{/code}}
150 150  
151 -A successful request will respond with the HTTP status code {{code}}201 Created{{/code}}. Any other status code can be seen as a failure and a description of how to handle it can be found in the [[Problems section>>doc:Main.ecommerce.payex-checkout.Introduction.Problems.WebHome]].
157 +A successful request will respond with the HTTP status code {{code}}201 Created{{/code}}. Any other status code can be seen as a failure and a description of how to handle it can be found in the [[Problems section>>doc:ecommerce.PayEx Checkout.Problems.WebHome]].
152 152  
153 153  Remember to persist the {{code}}Location{{/code}} header or value of the {{code}}id{{/code}} property in the response alongside the order, shopping cart or similar for which the Payment Session was created.
154 154  
155 155  = Retrieve Payment Session =
156 156  
157 -To retrieve a Payment Session, just perform an HTTP {{code}}GET{{/code}} request to the URL as returned in the response documented above. Within the Payment Session resource, you can discover the URL of the [[Payment>>Main.ecommerce.payex-checkout.Introduction.Payment.WebHome]] or [[Payer>>Main.ecommerce.payex-checkout.Introduction.Payer.WebHome]].
163 +To retrieve a Payment Session, just perform an HTTP {{code}}GET{{/code}} request to the URL as returned in the response documented above. Within the Payment Session resource, you can discover the URL of the [[Payment>>ecommerce.PayEx Checkout.Payment]] or [[Payer>>ecommerce.PayEx Checkout.Payer]].
158 158  
159 159  == Example ==
160 160  
... ... @@ -205,4 +205,4 @@
205 205  
206 206  = Problems =
207 207  
208 -If a request fails, its response will have a status code between 400 and 599. The HTTP body of the response will also be in the form of an {{code}}application/problem+json{{/code}} ([[RFC 7807>>https://tools.ietf.org/html/rfc7807]]), explaining in detail why the request failed and which, if any, actions you can take to remedy the problem. You can read more about this [[here>>doc:Main.ecommerce.payex-checkout.Introduction.Problems.WebHome]].
214 +If a request fails, its response will have a status code between 400 and 599. The HTTP body of the response will also be in the form of an {{code}}application/problem+json{{/code}} ([[RFC 7807>>https://tools.ietf.org/html/rfc7807]]), explaining in detail why the request failed and which, if any, actions you can take to remedy the problem. You can [[read more about problems here>>doc:ecommerce.PayEx Checkout.Problems.WebHome]].

Tips

If you're starting with XWiki, check out the Getting Started Guide.

Need help?

If you need help with XWiki you can contact: