Credit Card/Debit Card Integration

To pay using a credit card or debit card, perform the following steps.

  1. Set the following credit card parameters:
paymentParamForPassing.cardNumber = "5123456789012346" //cardNumber
paymentParamForPassing.nameOnCard = "name" //Name on card
paymentParamForPassing.expYear = "2018" //Expiry year
paymentParamForPassing.expMonth = "11" //ExpiryMonth
paymentParamForPassing.cvv = "123" //CVV
paymentParamForPassing.storeCardName = "My TestCard" //If you want to save card then pass StoreCardName otherwise it will not save & make sure userCredentials are provided
        self.paymentParamForPassing.cardNumber = @"5123456789012346";//cardNumber
        self.paymentParamForPassing.nameOnCard = @"name";//Name on card
        self.paymentParamForPassing.expYear = @"2018";//Expiry year
        self.paymentParamForPassing.expMonth = @"11";//ExpiryMonth
        self.paymentParamForPassing.CVV = @"123";//CVV
        self.paymentParamForPassing.storeCardName = @"My TestCard";//If you want to save card then pass StoreCardName otherwise it will not save & make sure userCredentials are provided
  1. Get the request by using the createRequestWithPaymentParam method as follows:
createRequest().createRequest(withPaymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_CCDC, withCompletionBlock: { request, postParam, error in
    if error == nil {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    } else {
        //Something went wrong with Parameter, error contains the error Message string
    }
})
        self.createRequest = [PayUCreateRequest new];
        [self.createRequest createRequestWithPaymentParam:self.paymentParamForPassing forPaymentType:PAYMENT_PG_CCDC withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
        if (error == nil) {
        //It is good to go state. You can use request parameter in webview to open Payment Page
        }
        else{
        //Something went wrong with Parameter, error contains the error Message string
        }
    }];