Return URL triggered
Once the customer is done with the hosted checkout flow, AppDirect will redirect the customer the customer to the "returnUrl" (either the one configured within AppDirect marketplace in the first step above, or the one sent over during the initial API request)
AppDirect will append three parameters to the returnUrl: token, transactionId, and result.
The result may have three possible values:
- success: means the purchase went through, and everything is fine
- cancel: means the user cancelled the purchase while in the hosted checkout flow
- error: means an error happened during the hosted checkout flow (e.g., the application provisioning failed)
Return URL example: http://developer.com/handleresponse?token=ABC&transactionId=XYZ&result=success
At this time, the developer should take the following actions: Once a user returns to the developer's defined "return URL", the developer should validate the token and transaction ID fields received acgainst the ones stored previously in the user session to make sure they match and that the session was not hijacked. Both received values should match with the ones stored previously. Next, the developer should call any business logic (whether it's developer-related or AppDirect-related, such as calling back any of the available AppDirect APIs found in the next step below to build the proper result/receipt page), and present the proper page content to the user depending on the "result" url parameter obtained.
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!