Checkout API Response Processor

The checkout API response processor is an optional helper API to process the response and show the 3ds webview if you're using the Core API directly. You may use this if you're using the Core API directly. If you use the SDK fully, you can skip this.

Since the response is processed beforehand, the app should already know the pending response. However, the processor does not know the actual status. So after completion, callback is called, the app should check the latest status API.



Account Linking


Android


The following script can be used as an example for account linking response processor on Android


GoPayCheckoutProcessor
    .getInstance()
    .processAccountLinking(
        ACTIVITY,
        RESPONSE,
        CALLBACK_URL,
        new GoPayCheckoutProcessorCallback() {
            @Override
            public void onCompleted() {
                // Handle completed
            }
        }
    );

IOS


The following script can be used as an example for account linking response processor on iOS

[GPYCheckoutProcessor processAccountLinkingWithResponse:linkingResponse viewController:viewController completion:^(GPYLinkAccountResult * _Nullable result, NSError * _Nullable error) {
    if (result) {
        // Handle completed
    } else{
        // Handle error
    }
}];



Making Payment


Android


The following script can be used as an example for making payment response processor on Android


GoPayCheckoutProcessor
    .getInstance()
    .processTransaction(
        ACTIVITY,
        RESPONSE,
        CALLBACK_URL,
        new GoPayCheckoutProcessorCallback() {
            @Override
            public void onCompleted() {
                // Handle completed
            }
        }
    );

IOS


The following script can be used as an example for create transaction response processor on iOS


[GPYCheckoutProcessor processCreateTransactionWithResponse:transactionResponse viewController:viewController completion:^(GPYTransactionResult * _Nullable result, NSError * _Nullable error) {
    if (result) {
       // Handle completed
    } else {
       // Handle error
    }
}];