In the Postprocess phase of the payment processing workflow, the app analyzes the response the order processing web app gave to the HTTP request that the app made in the Preprocess phase. In general terms, the response indicates whether the issuing bank approved or declined the payment. The response may also include an order number, order status, and other details that you deem useful for the user; the app may display a custom confirmation sheet containing this information. Finally, the app dismisses the payment sheet.
The following three sections describe the steps of the Postprocess phase.
The example user app receives the response from the order processing web app in a block in the backend_process_payment_info:gateway:charge_token:completion:
method. The block's arguments are an NSURLResponse
object and an NSData
object. The code that processes the response and returned data is highlighted...