Web Services for iOS Core SDK

This part of the document includes the following APIs for iOS Core SDK. Before you use the following APIs, initialise the web service as described in Initialise web service.

Initialise web service

  1. Create an object of the PayUWebServiceResponse class and call the respective methods. You will get the result in the completion handler of the method.
 let webServiceResponse = PayUWebServiceResponse()
PayUWebServiceResponse *webServiceResponse = [PayUWebServiceResponse new];

πŸ“˜

Note:

If there is an error in the parameters passed by the merchant, it will give the errorMessage string. Else, you will get the parsed object.

  1. Handle the response
[webServiceResponse getPayUPaymentRelatedDetailForMobileSDK:self.paymentParamForPassing withCompletionBlock:^(PayUModelPaymentRelatedDetail *paymentRelatedDetails, NSString *errorMessage, id extraParam) {
​
if (errorMessage) {
    // Something went wrong errorMessage is having the Detail
}else{
    // It is good to go & paymentRelatedDetails is having the full detail of it
}
}];