Receiving the SDK Response

The callBackResponseFromPaysafeSDK delegate method of the PaysafePaymentAuthorizationProcessDelegate class provides the SDK response. This method will pass the response for both success and failure scenarios.

For response scenarios, please refer to https://github.com/paysafegroup/paysafe_sdk_ios/blob/master/iOS_SDK/PaymentKit/PaySafePaymentAuthorizationProcess.h.

Responses

Use the callBackResponseFromPaysafeSDK method to return responses from the SDK.

-(void)callBackResponseFromPaysafeSDK:(NSDictionary*)response
{
}
func callBackResponseFromPaysafeSDK(response: [NSObject : AnyObject]!)
{
}

Response Scenarios

The callBackResponseFromPaysafeSDK method will return one of the responses below:

  • A payment token from Paysafe (by using single-use token). Single-use tokens are valid for only 15 minutes and are not consumed by verification.

    {
     "version":"Value",
     "data":"Value",
     "signature":"Value",
      "header":
        {
        "ephemeralPublicKey":"Value",
        "transactionId":"Value",
        "publicKeyHash":"Value"
        }
     }
  • A "Null" response due to network problems

  • An error response from Paysafe

    {
        code = "Error code";
        links =
            (
            {
                href = "Reference link for the specied error.";
                rel = errorinfo;
            }
            );
        message = "Value";
            };
        }

We provide sample applications in Objective-C and Swift to help you integrate using Xcode simulator (in the Test environment only).

Did you find this page useful?