Skip to content

Commit

Permalink
Updated PnP and CoreSDK with EMI and Review Order
Browse files Browse the repository at this point in the history
  • Loading branch information
RajvinderPayU committed May 30, 2018
1 parent 900c46d commit 6cb9dea
Show file tree
Hide file tree
Showing 62 changed files with 169 additions and 36 deletions.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/Assets.car
Binary file not shown.
2 changes: 2 additions & 0 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ typedef NS_ENUM(NSInteger, PUMEnvironment) {



#define EMI_SMALL @"emi"
#define EMI @"EMI"
#define CASH_CARD_SMALL @"cashcard"
#define CASH_CARD_CAPITAL @"CASHCARD"
#define CASH @"CASH"
Expand Down
21 changes: 21 additions & 0 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMEMI.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// PUMEMI.h
// PayUMoneyCoreSDK
//
// Created by Rajvinder Singh on 3/23/18.
// Copyright © 2018 PayU Payments Private Limited. All rights reserved.
//

#import "PUMCCDC.h"

@interface PUMEMI : PUMCCDC

/// eg., AXIS, HDFC, SBI etc
@property (strong, nonatomic) NSString *bankCode;

/// eg., AXIS03, AXIS06, HDFC03, HDFC09 etc
@property (strong, nonatomic) NSString *emiType;

@property (assign, nonatomic) BOOL isCreditCard;

@end
54 changes: 29 additions & 25 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMInternalConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#define DOWNLOAD_BANKIMAGE @"media/images/payment/payment/netbanking/"
#define CC_BIN_DETAILS @"payment/op/v1/getBinDetails" // params bin=541891
#define ADD_PAYMENT @"payment/app/v1/addPayment"
#define ADD_PAYMENT @"payment/app/v2/addPayment"
#define SEND_PAYMENT_OTP @"auth/op/sendPaymentOTP"
#define USER_REG_AND_LOGIN @"auth/op/registerAndLogin"
#define USER_GENERATE_WALLET_CODE @"/auth/app/generateWalletCode"
Expand Down Expand Up @@ -68,7 +68,7 @@
// ONE_TAP_ENABLE
#define ENABLE_ONE_TAP @"auth/app/setUserPaymentOption" //params oneClickTxn=-1 OR 0 OR 1 <POST
//#define KVAULT_TEST_URL @"http://tvapaymon.payubiz.in/vault/getToken" //POST
#define KVAULT_TEST_URL @"http://pp41.payumoney.com/oneclick/getToken" //POST
#define KVAULT_TEST_URL @"https://pp41.payumoney.com/oneclick/getToken" //POST
#define KVAULT_DELETE_TOKEN_URL_TEST @"http://tvapaymon.payubiz.in/vault/deleteToken"
#define KVAULT_PROD_URL @"https://www.payumoney.com/oneclick/getToken" //POST
#define KVAULT_DELETE_TOKEN_URL_PROD @"https://www.payumoney.com/oneclick/deleteToken"
Expand Down Expand Up @@ -210,6 +210,7 @@
************************************************** Internal Environments ***********************
*/
#define ENVIRONMENT_PP42 @"PP42"
#define ENVIRONMENT_PP25 @"PP25"
#define ENVIRONMENT_PP41 @"PP41"
#define ENVIRONMENT_PP10 @"PP10"
#define ENVIRONMENT_PP0 @"PP0"
Expand All @@ -218,29 +219,31 @@

//API URLs
#define ENVIRONMENT_PRODUCTION_API_URL @"https://www.payumoney.com/"
#define ENVIRONMENT_TEST_API_URL @"https://test.payumoney.com/"
#define ENVIRONMENT_PP42_API_URL @"http://pp42.payumoney.com/"
#define ENVIRONMENT_PP48_API_URL @"http://pp51.payumoney.com/"
#define ENVIRONMENT_PP41_API_URL @"http://pp41.payumoney.com/"
#define ENVIRONMENT_PP10_API_URL @"http://pp10.payumoney.com/"
#define ENVIRONMENT_PP0_API_URL @"http://pp0.payumoney.com/"
#define ENVIRONMENT_PP4_API_URL @"http://pp4.payumoney.com/"
#define ENVIRONMENT_PP22_API_URL @"http://pp22.payumoney.com/"
#define ENVIRONMENT_TEST_API_URL @"https://www.payumoney.com/sandbox/"
#define ENVIRONMENT_PP42_API_URL @"https://pp42.payumoney.com/"
#define ENVIRONMENT_PP25_API_URL @"https://pp25.payumoney.com/"
#define ENVIRONMENT_PP48_API_URL @"https://pp51.payumoney.com/"
#define ENVIRONMENT_PP41_API_URL @"https://pp41.payumoney.com/"
#define ENVIRONMENT_PP10_API_URL @"https://pp10.payumoney.com/"
#define ENVIRONMENT_PP0_API_URL @"https://pp0.payumoney.com/"
#define ENVIRONMENT_PP4_API_URL @"https://pp4.payumoney.com/"
#define ENVIRONMENT_PP22_API_URL @"https://pp22.payumoney.com/"
#define ENVIRONMENT_MOBILE_TEST_API_URL @"https://mobiletest.payumoney.com/"
#define ENVIRONMENT_PP44_API_URL @"http://pp44.payumoney.com/"
#define ENVIRONMENT_PP44_API_URL @"https://pp44.payumoney.com/"

//Web URLs
#define ENVIRONMENT_PRODUCTION_WEB_URL @"https://secure.payu.in/_seamless_payment"
#define ENVIRONMENT_TEST_WEB_URL @"https://test.payu.in/_seamless_payment"
#define ENVIRONMENT_PP42_WEB_URL @"http://pp42.secure.payu.in/_seamless_payment/"
#define ENVIRONMENT_PP41_WEB_URL @"http://pp41.secure.payu.in/_seamless_payment/"
#define ENVIRONMENT_PP10_WEB_URL @"http://pp10.secure.payu.in/_seamless_payment/"
#define ENVIRONMENT_PP0_WEB_URL @"http://pp0.secure.payu.in/_seamless_payment/"
#define ENVIRONMENT_PP48_WEB_URL @"http://pp51.secure.payu.in/_seamless_payment/"
#define ENVIRONMENT_PP4_WEB_URL @"http://pp4.secure.payu.in/_seamless_payment/"
#define ENVIRONMENT_MOBILE_TEST_WEB_URL @"http://mobiletest.payu.in/_seamless_payment/"
#define ENVIRONMENT_PP22_WEB_URL @"http://pp22.secure.payu.in/_seamless_payment/"
#define ENVIRONMENT_PP44_WEB_URL @"http://pp44.secure.payu.in/_seamless_payment/"
#define ENVIRONMENT_PRODUCTION_WEB_URL @"https://secure.payu.in/_payment"
#define ENVIRONMENT_TEST_WEB_URL @"https://sandboxsecure.payu.in/_payment"
#define ENVIRONMENT_PP42_WEB_URL @"http://pp42.secure.payu.in/_payment"
#define ENVIRONMENT_PP25_WEB_URL @"http://pp25.secure.payu.in/_payment"
#define ENVIRONMENT_PP41_WEB_URL @"http://pp41.secure.payu.in/_payment"
#define ENVIRONMENT_PP10_WEB_URL @"http://pp10.secure.payu.in/_payment"
#define ENVIRONMENT_PP0_WEB_URL @"http://pp0.secure.payu.in/_payment"
#define ENVIRONMENT_PP48_WEB_URL @"http://pp51.secure.payu.in/_payment"
#define ENVIRONMENT_PP4_WEB_URL @"http://pp4.secure.payu.in/_payment"
#define ENVIRONMENT_MOBILE_TEST_WEB_URL @"http://mobiletest.payu.in/_payment"
#define ENVIRONMENT_PP22_WEB_URL @"http://pp22.secure.payu.in/_payment"
#define ENVIRONMENT_PP44_WEB_URL @"http://pp44.secure.payu.in/_payment"



Expand Down Expand Up @@ -290,9 +293,10 @@ typedef NS_ENUM(NSInteger, PUMInternalEnvironment) {
PUMEnvironmentPP10,
PUMEnvironmentPP0,
PUMEnvironmentPP4,
PUMEnvironmentPP22,
PUMEnvironmentPP48,
PUMEnvironmentPP44
PUMEnvironmentPP22,
PUMEnvironmentPP48,
PUMEnvironmentPP44,
PUMEnvironmentPP25
};


Expand Down
15 changes: 13 additions & 2 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMLogEvents.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ static NSString *const KPUMAWalletValue = @"PUMWallet";
static NSString *const KPUMAWalletCardValue = @"PUMWallet|Cards";
static NSString *const KPUMAWalletNetBankValue = @"PUMWallet|Bank";
static NSString *const KPUMA3PWallet = @"3PWallet";
static NSString *const KPUMAEMI = @"EMI";

static NSString *const kPUMAScreenTypeCheckout = @"Checkout";
static NSString *const kPUMAScreenTypeAddCard = @"AddCard";
static NSString *const kPUMAScreenTypeCVVEntry = @"CVVEntry";
static NSString *const kPUMAScreenTypeEMITenure = @"EMITenure";
static NSString *const kPUMAScreenTypeEMIAddCard = @"EMIAddCard";
static NSString *const kPUMAScreenTypeMoreNetBank = @"MoreNetBank";
static NSString *const kPUMAScreenTypeMore3PWallets = @"More3PWallets";
static NSString *const kPUMAScreenTypeMoreEMI = @"MoreEMI";
static NSString *const kPUMAScreenTypeLogin = @"Login";
static NSString *const kPUMAScreenTypeVerifyOTP = @"VerifyOTP";
static NSString *const kPUMAScreenTypeWebView = @"WebView";
Expand Down Expand Up @@ -91,8 +95,7 @@ static NSString *const kPUMAInvalidCVV = @"Invalid CVV";

+(void)more3PWalletsClicked;

//+(void)moreEMIBanksClicked;

+(void)moreEMIBanksClicked:(NSString *)amount;
//+(void)twoFALoaded;

+(void)paymentAbandonedWithReason:(NSString *)reason;
Expand All @@ -101,6 +104,14 @@ static NSString *const kPUMAInvalidCVV = @"Invalid CVV";

+(void)thirdPartyWalletPayment:(NSString *)walletName;

+(void)EMIPaymentInitiated:(NSString *)bankName amount:(NSString *)amount;

+(void)EMITenureSelected:(NSString *)tenure bankName:(NSString *)bankName amount:(NSString *)amount;

+(void)EMICardSaved:(NSString *)cardScheme bankName:(NSString *)bankName amount:(NSString *)amount;

+(void)EMIBankChangedWithSelectedBank:(NSString *)bankName prevBank:(NSString *)prevBank page:(NSString *)page amount:(NSString *)amount;

+(void)invalidPaymentInfoWithPaymentMethod:(NSString *)paymentMethod withReason:(NSString *) reason;

+(void)txnCancelAttemptWithTxnStatus:(BOOL)status;
Expand Down
5 changes: 4 additions & 1 deletion CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMPaymentParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
#import "PUMSaveCardBO.h"
#import "PUMNetBankingBO.h"
#import "PUMCCDC.h"
#import "PUMEMI.h"

typedef NS_ENUM(NSInteger, PUMPaymentMode) {
PUMPaymentModeNone = 0,
PUMPaymentModeCCDC,
PUMPaymentModeNetBanking,
PUMPaymentModeStoredCard,
PUMPaymentMode3PWallet
PUMPaymentMode3PWallet,
PUMPaymentModeEMI
};
@interface PUMPaymentParam : NSObject

Expand All @@ -25,6 +27,7 @@ typedef NS_ENUM(NSInteger, PUMPaymentMode) {
@property (strong, nonatomic) PUMNetBankingBO * objNetBanking;
@property (strong, nonatomic) PUMCCDC * objCCDC;
@property (strong, nonatomic) PUMNetBankingBO * obj3PWallet;
@property (strong, nonatomic) PUMEMI * objEMI;

/**
Set payment mode
Expand Down
8 changes: 7 additions & 1 deletion CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMSDKError.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ typedef NS_ENUM(NSInteger, PUMSDKErrorCode)
PUMError3PWalletUnavailable,
PUMErrorSplitNotAllowedWith3PWallet,
PUMError3PWalletNotSupported,
PUMErrorCantSaveCard
PUMErrorCantSaveCard,
PUMErrorEMIUnavailable,
PUMErrorEMIOptionUnavailable,
PUMErrorSplitNotAllowedWithEMI,
PUMErrorInternationalCardWithEMI,
PUMErrorDebitCardWithEMI,
PUMInvalidReviewOrder
};

+(NSError *)toNSError:(int)errorCode
Expand Down
9 changes: 8 additions & 1 deletion CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ typedef enum {
*/

+(double)calculateConvFeesForPaymentMode:(NSString*)paymentMode
andModeType:(NSString*)modeType;
andModeType:(NSString*)modeType
isWalletSelected:(BOOL)isWalletSelected;

+ (double)calculateConvFeesForPayment:(PUMPaymentParam *)paymentParam;

Expand Down Expand Up @@ -142,6 +143,10 @@ typedef enum {

+(NSDecimalNumber *)roundUpNumberTo2DecimalPlaces:(NSDecimalNumber *) number;

+(NSString *)stringUpto2Decimal:(NSString *)str;

+(NSDecimalNumber *)decimalNumberFromFloat:(float)value;

+(NSString *)getTotalAmountFromPaymentResponse:(NSDictionary *) response;

+(NSString *)getPaymentIDFromAddPaymentResponse:(NSDictionary *) response;
Expand All @@ -150,4 +155,6 @@ typedef enum {

+(BOOL)isNumber:(NSString *) str;

+(id)objectFromString:(NSString *)str error:(NSError **)err;

@end
28 changes: 27 additions & 1 deletion CoreSDK/PayUMoneyCoreSDK.framework/Headers/PayUMoneyCoreSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#import "PUMTextField.h"
#import "PUMLogEvents.h"


#define SDK_Default_COLOR UIColorFromRGB([PUMUIConfig intFromHexString:defaultLinkTextColor])
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

Expand All @@ -30,6 +29,11 @@

typedef void (^PUMRawJSONCompletionBlock)(NSDictionary *response ,NSError *error, id extraParam);
typedef void (^PUMPaymentCompletionBlock)(NSDictionary *response ,NSError *error ,NSError *validationError, id extraParam);
/**
This completion blocks takes actionOccurred as a param and returns the title of the RightBarButton in Payment's WebView
*/
typedef NSString* (^PUMRightActionCompletionBlock)(BOOL actionOccurred);

@interface PayUMoneyCoreSDK : NSObject


Expand All @@ -47,6 +51,7 @@ typedef void (^PUMPaymentCompletionBlock)(NSDictionary *response ,NSError *error

+ (PayUMoneyCoreSDK *)sharedInstance;

@property (copy,nonatomic) PUMRightActionCompletionBlock rightActionBlock;

/**
* isUserSignedIn.
Expand All @@ -61,6 +66,12 @@ typedef void (^PUMPaymentCompletionBlock)(NSDictionary *response ,NSError *error
*/
+ (BOOL)signOut;

/// Set this property to show order details. This should only contain NSDictionary objects with only one key value pair.
-(NSError *)setOrderDetails:(NSArray*)orderDetails;

/// Returns details of order containing NSDictionary
-(NSArray*)orderDetails;

- (void)showLoginVCOnViewController:(UIViewController *)viewController
withCompletionBlock:(PUMRawJSONCompletionBlock)completionBlock;

Expand All @@ -72,6 +83,13 @@ typedef void (^PUMPaymentCompletionBlock)(NSDictionary *response ,NSError *error
//APIs
- (void)addPaymentAPIWithCompletionBlock:(PUMRawJSONCompletionBlock)completionBlock;

/// This method is used for getting updated emi tenures (including convenience fee) from bank code
- (void)getEMIOptionsForBank:(NSString *)bankCode completion:(PUMRawJSONCompletionBlock)completionBlock;


/// This method is used for getting updated emi tenures on the basis of amount provided. Amount should contain convenience fee as well
- (void)getEMIOptionsForAmount:(NSString *)amount completion:(PUMRawJSONCompletionBlock)completionBlock;

- (void)fetchPaymentUserDataAPIWithCompletionBlock:(PUMRawJSONCompletionBlock)completionBlock;

- (void)getBinDetailsAPI:(NSString *)cardBin
Expand All @@ -88,6 +106,14 @@ typedef void (^PUMPaymentCompletionBlock)(NSDictionary *response ,NSError *error
- (void)getMultipleBinDetailsAPI:(NSArray *)arrCardBin
withCompletionBlock:(PUMRawJSONCompletionBlock)completionBlock;

/**
Returns Valid EMI Options. It takes minimum value for EMI into consideration.
@param emiArray The array from which valid EMI option is to be fetched
@return Valid EMI Options
*/
- (NSMutableArray *)validEmiOptions:(NSMutableArray *)emiArray;

/**
This API is used to mark txn as user cancelled, when user decides to cancel the transaction
Expand Down
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/Info.plist
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBAllPaymentOption.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBApproveView.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBBankPageLoading.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBFooterView.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBHeaderView.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBLoader.nib
Binary file not shown.
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBPasswordNB.nib
Binary file not shown.
Binary file added CoreSDK/PayUMoneyCoreSDK.framework/PUCBROCell.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBRegenerateOTPView.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBRegisterOption.nib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBUserIdNB.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUMLoginVC.nib
Binary file not shown.
Binary file added CoreSDK/PayUMoneyCoreSDK.framework/PayUCBInfo.plist
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PayUMoneyCoreSDK
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// PUCBReviewOrderConfig.h
// PayUNonSeamlessTestApp
//
// Created by Umang Arya on 11/18/16.
// Copyright © 2016 PayU. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CBConstant.h"

@interface PUCBReviewOrderConfig : NSObject


NS_ENUM(NSInteger)
{
PUCBROArrForReviewOrderUndefined = 101,
PUCBROCustomReviewOrderUndefined = 102
};

-(instancetype) init ATTRIBUTE_INIT;
+(instancetype) new ATTRIBUTE_NEW;

@property (nonatomic,readonly) NSArray <NSDictionary*> *arrForReviewOrder;
@property (nonatomic, readonly) UIView *vwCustomReviewOrder;

@property (nonatomic, strong) NSString *btnText;
@property (nonatomic, strong) UIColor *btnBGColor;
@property (nonatomic, strong) UIColor *btnTxtColor;

@property (nonatomic, strong) NSString *ReviewOrderHeaderForDefaultView;
-(instancetype)initWithArrForReviewOrder:( NSArray *) arrForReviewOrder
error:(NSError **) error;

-(instancetype)initWithCustomView:(UIView *) vwCustomReviewOrder
error:(NSError **) error;
@end
4 changes: 2 additions & 2 deletions PayUmoney_CoreSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
Pod::Spec.new do |s|

s.name = "PayUmoney_CoreSDK"
s.version = "3.2"
s.version = "3.3"
s.summary = "PayUmoney iOS SDK"
s.description = "This is a native SDK to integrate PayUmoney services with iOS apps"

s.homepage = "https://github.com/payu-intrepos/PayUMoney-IOS-SDK"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Umang Arya" => "[email protected]" }
s.source = { :git => "https://github.com/payu-intrepos/PayUMoney-IOS-SDK.git", :tag => "PayUmoney_CoreSDK.3.2" }
s.source = { :git => "https://github.com/payu-intrepos/PayUMoney-IOS-SDK.git", :tag => "PayUmoney_CoreSDK.3.3" }

s.ios.deployment_target = '8.0'
s.requires_arc = true
Expand Down
4 changes: 2 additions & 2 deletions PayUmoney_PnP.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
Pod::Spec.new do |s|

s.name = "PayUmoney_PnP"
s.version = "2.2"
s.version = "2.3"
s.summary = "Native iOS integration & easy to integrate and use library."
s.description = "Provides a ready to use, drop in set of User Screens to enable payments with iOS Apps. Provide an end to end payment experience with all the features offered by the Citrus SDK. Reduces integration friction as merchants do not have to worry about designing the checkout screen, bank assets, or deal with complexity required to handle different payments methods."

s.homepage = "https://github.com/payu-intrepos/PayUMoney-IOS-SDK"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Umang Arya" => "[email protected]" }
s.source = { :git => "https://github.com/payu-intrepos/PayUMoney-IOS-SDK.git", :tag => "PayUmoney_PnP.2.2" }
s.source = { :git => "https://github.com/payu-intrepos/PayUMoney-IOS-SDK.git", :tag => "PayUmoney_PnP.2.3" }

s.ios.deployment_target = '8.0'
s.requires_arc = true
Expand Down
Binary file modified PlugNPlay/PlugNPlay.framework/Assets.car
Binary file not shown.
Loading

0 comments on commit 6cb9dea

Please sign in to comment.