diff --git a/BizCore+CB SampleApp/CommonFiles/Utils/PUSAHelperClass.h b/BizCore+CB SampleApp/CommonFiles/Utils/PUSAHelperClass.h index 4c27a28..c0616bb 100755 --- a/BizCore+CB SampleApp/CommonFiles/Utils/PUSAHelperClass.h +++ b/BizCore+CB SampleApp/CommonFiles/Utils/PUSAHelperClass.h @@ -7,7 +7,7 @@ // #import -#import +#import #import "PUSAWSManager.h" typedef void (^hashRequestCompletionBlock)(PayUModelHashes *hashes, NSString *errorString); diff --git a/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Configuration/PUVAConfiguration.m b/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Configuration/PUVAConfiguration.m index 754da9f..df7ae52 100755 --- a/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Configuration/PUVAConfiguration.m +++ b/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Configuration/PUVAConfiguration.m @@ -7,13 +7,28 @@ // #import "PUVAConfiguration.h" -#import +#import + @implementation PUVAConfiguration -(instancetype)init{ self = [super init]; if (self) { - self.arrAPIName = [NSArray arrayWithObjects:COMMAND_CHECK_OFFER_DETAILS,COMMAND_CHECK_OFFER_STATUS,COMMAND_DELETE_USER_CARD,COMMAND_GET_EMI_AMOUNT_ACCORDING_TO_INTEREST,COMMAND_VAS_FOR_MOBILE_SDK,COMMAND_GET_USER_CARDS,COMMAND_VERIFY_PAYMENT,COMMAND_EDIT_USER_CARD,COMMAND_DELETE_ONE_TAP_TOKEN,COMMAND_CHECK_IS_DOMESTIC,COMMAND_GET_TRANSACTION_INFO,COMMAND_SAVE_USER_CARD,nil]; + self.arrAPIName = [NSArray arrayWithObjects: + COMMAND_CHECK_OFFER_DETAILS, + COMMAND_CHECK_OFFER_STATUS, + COMMAND_GET_USER_CARDS, + COMMAND_SAVE_USER_CARD, + COMMAND_EDIT_USER_CARD, + COMMAND_DELETE_USER_CARD, + COMMAND_DELETE_ONE_TAP_TOKEN, + COMMAND_VAS_FOR_MOBILE_SDK, + COMMAND_VERIFY_PAYMENT, + COMMAND_CHECK_IS_DOMESTIC, + COMMAND_GET_TRANSACTION_INFO, + COMMAND_GET_EMI_AMOUNT_ACCORDING_TO_INTEREST, + COMMAND_ELIGIBLE_BINS_FOR_EMI, + nil]; } return self; } diff --git a/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Presentation Layer/PUVABaseResponseVC.m b/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Presentation Layer/PUVABaseResponseVC.m index 2ae3740..011d687 100755 --- a/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Presentation Layer/PUVABaseResponseVC.m +++ b/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Presentation Layer/PUVABaseResponseVC.m @@ -120,6 +120,9 @@ - (void)viewDidLoad { else if ([self.responseVCType isEqual:COMMAND_SAVE_USER_CARD]){ [self setupForSaveUserCard]; } + else if ([self.responseVCType isEqual:COMMAND_ELIGIBLE_BINS_FOR_EMI]){ + [self setupForEligibleBinForEMI]; + } } -(void)dealloc{ @@ -246,6 +249,9 @@ - (IBAction)btnClickedResponse:(id)sender { else if ([self.responseVCType isEqual:COMMAND_SAVE_USER_CARD]){ [self btnClickedSaveUserCard]; } + else if ([self.responseVCType isEqual:COMMAND_ELIGIBLE_BINS_FOR_EMI]){ + [self btnClickedEligibleBinForEMI]; + } } -(void)btnClickedVAS{ @@ -845,6 +851,42 @@ -(void)btnClickedSaveUserCard{ } } +#pragma mark - eligibleBinForEMI Methods + +-(void)setupForEligibleBinForEMI{ + self.vwView1.hidden = FALSE; + self.vwView2.hidden = FALSE; + + self.lblVar1.text = @"Card Bin"; + self.lblVar2.text = @"Bank Name"; + + self.txtFieldVar1.placeholder = @"512345"; + self.txtFieldVar2.placeholder = @"HDFC"; +} + +-(void)btnClickedEligibleBinForEMI{ + self.paymentParam.cardNumber = self.txtFieldVar1.text; + self.paymentParam.issuingBank = self.txtFieldVar2.text; + + if ([self setHashes]) { + [self startActivityIndicator]; + [_webServiceResponse eligibleBinsForEMI:self.paymentParam + withCompletionBlock:^(NSArray *arrEMIDetails, NSString *errorMessage, id extraParam) { + [_defaultActivityIndicator stopAnimatingActivityIndicator]; + if (!errorMessage) { + NSMutableString *message = [[NSMutableString alloc]init]; + for (PayUModelEMIDetails *emiDetails in arrEMIDetails) { + [message appendFormat:@"BankName : %@\nSupportedBin : %@\nMinAmount : %@\nisEligible : %d\n------\n", emiDetails.bankReference ,emiDetails.supportedCardBins ,emiDetails.minTxnAmount,emiDetails.isEligible]; + } + PAYUALERT(@"Response", message); + } + else{ + PAYUALERT(@"Error", errorMessage); + } + }]; + } +} + #pragma mark - Helper Methods -(BOOL)setHashes{ diff --git a/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Presentation Layer/PUVAOptionsVC.m b/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Presentation Layer/PUVAOptionsVC.m index 60b225a..b01c101 100755 --- a/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Presentation Layer/PUVAOptionsVC.m +++ b/BizCore+CB SampleApp/ObjC/PayUNonSeamlessTestApp/SampleApp/VerifyAPI/Presentation Layer/PUVAOptionsVC.m @@ -54,75 +54,7 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath * responseVC.paymentParam = [self.paymentParam copy]; responseVC.paymentRelatedDetail = self.paymentRelatedDetail; responseVC.vAConfig = _verifyAPIConfig; - switch (indexPath.row) { - case 0:{ - responseVC.responseVCType = COMMAND_CHECK_OFFER_DETAILS; - break; - } - case 1: - { - responseVC.responseVCType = COMMAND_CHECK_OFFER_STATUS; - responseVC.paymentParam.userCredentials = nil; - break; - } - case 2: - { - responseVC.responseVCType = COMMAND_DELETE_USER_CARD; - break; - } - case 3: - { - responseVC.responseVCType = COMMAND_GET_EMI_AMOUNT_ACCORDING_TO_INTEREST; - responseVC.paymentParam.userCredentials = nil; - break; - } - case 4: - { - responseVC.responseVCType = COMMAND_VAS_FOR_MOBILE_SDK; - responseVC.paymentParam.userCredentials = nil; - break; - } - case 5: - { - responseVC.responseVCType = COMMAND_GET_USER_CARDS; - break; - } - case 6: - { - responseVC.responseVCType = COMMAND_VERIFY_PAYMENT; - responseVC.paymentParam.userCredentials = nil; - break; - } - case 7: - { - responseVC.responseVCType = COMMAND_EDIT_USER_CARD; - break; - } - case 8: - { - responseVC.responseVCType = COMMAND_DELETE_ONE_TAP_TOKEN; - break; - } - case 9: - { - responseVC.responseVCType = COMMAND_CHECK_IS_DOMESTIC; - responseVC.paymentParam.userCredentials = nil; - break; - } - case 10: - { - responseVC.responseVCType = COMMAND_GET_TRANSACTION_INFO; - responseVC.paymentParam.userCredentials = nil; - break; - } - case 11: - { - responseVC.responseVCType = COMMAND_SAVE_USER_CARD; - break; - } - default: - break; - } + responseVC.responseVCType = [_verifyAPIConfig.arrAPIName objectAtIndex:indexPath.row]; [self.navigationController pushViewController:responseVC animated:TRUE]; } diff --git a/PG SDK UI/CustomViews/PUUIEMITopView.m b/PG SDK UI/CustomViews/PUUIEMITopView.m index 8ac47fa..5667a33 100755 --- a/PG SDK UI/CustomViews/PUUIEMITopView.m +++ b/PG SDK UI/CustomViews/PUUIEMITopView.m @@ -7,7 +7,7 @@ // #import "PUUIEMITopView.h" -#import +#import #import "PUUICardOptionVC.h" #import "PUUIConstants.h" diff --git a/PG SDK UI/Presentation Layer/Base ViewController/PUUIBaseVC.h b/PG SDK UI/Presentation Layer/Base ViewController/PUUIBaseVC.h index 8c04ddf..cd1057f 100755 --- a/PG SDK UI/Presentation Layer/Base ViewController/PUUIBaseVC.h +++ b/PG SDK UI/Presentation Layer/Base ViewController/PUUIBaseVC.h @@ -8,7 +8,7 @@ #import #import "PUUIConstants.h" -#import +#import #import "UIColor+PUUIColor.h" #import "PUUIReachability.h" diff --git a/PG SDK UI/Presentation Layer/PUUICardOptionVC.h b/PG SDK UI/Presentation Layer/PUUICardOptionVC.h index 703af05..f7af792 100755 --- a/PG SDK UI/Presentation Layer/PUUICardOptionVC.h +++ b/PG SDK UI/Presentation Layer/PUUICardOptionVC.h @@ -7,7 +7,7 @@ // #import -#import +#import @protocol CardOptionDelegate diff --git a/PG SDK UI/Presentation Layer/PUUIPayUUPIVC.m b/PG SDK UI/Presentation Layer/PUUIPayUUPIVC.m index 5de1fe3..5eb3e9a 100644 --- a/PG SDK UI/Presentation Layer/PUUIPayUUPIVC.m +++ b/PG SDK UI/Presentation Layer/PUUIPayUUPIVC.m @@ -7,7 +7,7 @@ #import #import "PUUIPayUUPIVC.h" -#import +#import @interface PUUIPayUUPIVC () diff --git a/PG SDK UI/Presentation Layer/PUUIPaymentOptionVC.h b/PG SDK UI/Presentation Layer/PUUIPaymentOptionVC.h index ebc644d..1e6c69d 100755 --- a/PG SDK UI/Presentation Layer/PUUIPaymentOptionVC.h +++ b/PG SDK UI/Presentation Layer/PUUIPaymentOptionVC.h @@ -7,7 +7,7 @@ // #import "PUUIWrapperKHTabPagerVC.h" -#import +#import @interface PUUIPaymentOptionVC : PUUIWrapperKHTabPagerVC diff --git a/PG SDK UI/Presentation Layer/PUUIPaymentOptionVC.m b/PG SDK UI/Presentation Layer/PUUIPaymentOptionVC.m index e13b928..9bb008f 100755 --- a/PG SDK UI/Presentation Layer/PUUIPaymentOptionVC.m +++ b/PG SDK UI/Presentation Layer/PUUIPaymentOptionVC.m @@ -13,7 +13,7 @@ #import "PUUINBVC.h" #import "PUUIConstants.h" #import -#import +#import #import "PUUIStoredCardCarouselVC.h" #import "PUUIPayUMoneyVC.h" #import "iOSDefaultActivityIndicator.h" diff --git a/PG SDK UI/Utility/PUUIUtility.h b/PG SDK UI/Utility/PUUIUtility.h index 924ca60..4701503 100755 --- a/PG SDK UI/Utility/PUUIUtility.h +++ b/PG SDK UI/Utility/PUUIUtility.h @@ -8,7 +8,7 @@ #import #import -#import +#import #import "PUUIImageConstants.h"