Skip to content

Commit

Permalink
Merge pull request #25 from payu-intrepos/feature/3PWallet
Browse files Browse the repository at this point in the history
Updated Pnp and CoreSDK with 3rd party wallet
  • Loading branch information
Vipin Aggarwal authored Apr 10, 2018
2 parents 93dfe42 + 85c3583 commit c69fb3b
Show file tree
Hide file tree
Showing 51 changed files with 103 additions and 10 deletions.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/Assets.car
Binary file not shown.
4 changes: 4 additions & 0 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMCCDC.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@

@property BOOL validateDetails;

@property BOOL shouldSave;

@property (strong, nonatomic) NSString *countryCode;

@end
6 changes: 6 additions & 0 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,10 @@ typedef NS_ENUM(NSInteger, PUMEnvironment) {
#define ISSUER_JCB @"JCB"



#define CASH_CARD_SMALL @"cashcard"
#define CASH_CARD_CAPITAL @"CASHCARD"
#define CASH @"CASH"

#define PAYMENT_MODE_CASH_CARD @"cashcard"
#endif /* PUMConstants_h */
7 changes: 7 additions & 0 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMHelperClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
//

#import <Foundation/Foundation.h>
#import "PUMPaymentParam.h"

@interface PUMHelperClass : NSObject

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

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


+ (BOOL)isCardNumberValid:(NSString *)cardNumber cardType:(NSString *)cardType;

+ (BOOL)validateLuhnCheckOnCardNumber:(NSString *) cardNumber;
Expand All @@ -24,6 +28,8 @@

+ (BOOL)isValidPhoneNumber:(NSString *)phoneNumber;

+ (BOOL)canSaveCardWithCountry:(NSString *)countryCode;

+ (BOOL)isValidAmount:(NSString *)amount;

+ (BOOL)isValidEmail:(NSString *)email;
Expand All @@ -42,4 +48,5 @@

+ (NSString *)getUserEmailFromFetchUserDataAPI;


@end
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#define USER_LOAD_WALLET_URL @"payment/app/wallet/loadWalletPayment"
#define USER_FETCH_PAYMENT_USER_DATA_URL @"payment/app/v1/fetchPaymentUserData"
#define FETCH_USER_DATA_URL @"payment/op/v1/fetchUserDataFromEmailMobile"
#define GET_MULTIPLE_BIN_DETAILS @"payment/op/v1/getMultipleBinDetails"


//Cards
Expand All @@ -61,6 +62,7 @@
#define OTP_URL @"auth/op/generateAndSendOTP"
#define Forgot_Password_URL @"auth/app/forgot/password"
#define Cancel_Transaction_URL @"payment/postBackParam.do"
#define Cancel_Transaction @"payment/postBackParamIcp.do"
#define Post_Payment_URL @"payment/app/postPayment"

// ONE_TAP_ENABLE
Expand Down Expand Up @@ -329,10 +331,13 @@ typedef NS_ENUM(NSInteger,SDK_REQUEST_TYPE ) {
SDK_EMI_DETAILS,
SDK_ANALYTICS_FETCH_API_TOKEN,
SDK_ANALYTICS_SEND,
SDK_FETCH_USER_DATA
SDK_FETCH_USER_DATA,
SDK_GET_MULTIPLE_BIN_DETAILS

};

static NSString *const kPUMAOTP = @"OTP";
static NSString *const kPUMAPassword = @"Password";


@interface PUMInternalConstants : NSObject
Expand Down
19 changes: 19 additions & 0 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMLogEvents.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@ static NSString *const KPUMANetBankValue = @"Bank";
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 kPUMAScreenTypeCheckout = @"Checkout";
static NSString *const kPUMAScreenTypeAddCard = @"AddCard";
static NSString *const kPUMAScreenTypeCVVEntry = @"CVVEntry";
static NSString *const kPUMAScreenTypeMoreNetBank = @"MoreNetBank";
static NSString *const kPUMAScreenTypeMore3PWallets = @"More3PWallets";
static NSString *const kPUMAScreenTypeLogin = @"Login";
static NSString *const kPUMAScreenTypeVerifyOTP = @"VerifyOTP";
static NSString *const kPUMAScreenTypeWebView = @"WebView";
static NSString *const kPUMAScreenTypeTxnSucceeded = @"TxnSucceeded";
static NSString *const kPUMAScreenTypeTxnFailed = @"TxnFailed";

static NSString *const kPUMAInvalidCardNumber = @"Invalid Card Number";
static NSString *const kPUMAInvalidCVV = @"Invalid CVV";

@interface PUMLogEvents : NSObject

+(void)sdkInit;
Expand All @@ -34,6 +39,8 @@ static NSString *const kPUMAScreenTypeTxnFailed = @"TxnFailed";

+(void)paymentFailedWithReason:(NSString *) reason andAmount:(NSString *) amount;

+(void)loginAttempted;

+(void)loginInitiatedWithUserName:(NSString *) username;

//+(void)loginIDEnteredWithIDValue:(NSString *)idValue;
Expand All @@ -44,6 +51,10 @@ static NSString *const kPUMAScreenTypeTxnFailed = @"TxnFailed";

+(void)loginOTPResentWithUserName:(NSString *)username;

+(void)loginSucceeded:(NSString *)authType withUserName:(NSString *) username;

+(void)loginFailed:(NSString *)authType withUserName:(NSString *) username;

+(void)hidePaymentDetailsClickedWithPage:(NSString *)page;

+(void)showPaymentDetailsClickedWithPage:(NSString *)page;
Expand Down Expand Up @@ -78,6 +89,8 @@ static NSString *const kPUMAScreenTypeTxnFailed = @"TxnFailed";

+(void)moreNBBanksClicked;

+(void)more3PWalletsClicked;

//+(void)moreEMIBanksClicked;

//+(void)twoFALoaded;
Expand All @@ -86,4 +99,10 @@ static NSString *const kPUMAScreenTypeTxnFailed = @"TxnFailed";

+(void)nbUnreachableWithBankName:(NSString *)bankName;

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

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

+(void)txnCancelAttemptWithTxnStatus:(BOOL)status;

@end
5 changes: 3 additions & 2 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMPaymentParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ typedef NS_ENUM(NSInteger, PUMPaymentMode) {
PUMPaymentModeNone = 0,
PUMPaymentModeCCDC,
PUMPaymentModeNetBanking,
PUMPaymentModeStoredCard
PUMPaymentModeStoredCard,
PUMPaymentMode3PWallet
};
@interface PUMPaymentParam : NSObject

// SavedCard, NetBanking CCDC model objects
@property (strong, nonatomic) PUMSaveCardBO * objSavedCard;
@property (strong, nonatomic) PUMNetBankingBO * objNetBanking;
@property (strong, nonatomic) PUMCCDC * objCCDC;

@property (strong, nonatomic) PUMNetBankingBO * obj3PWallet;

/**
Set payment mode
Expand Down
6 changes: 5 additions & 1 deletion CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMSDKError.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ typedef NS_ENUM(NSInteger, PUMSDKErrorCode)
PUMErrorNBUnavailable,
PUMErrorWalletUnavailable,
PUMErrorPaymentIDUnavailable,
PUMErrorMobileOrEmailInvalid
PUMErrorMobileOrEmailInvalid,
PUMError3PWalletUnavailable,
PUMErrorSplitNotAllowedWith3PWallet,
PUMError3PWalletNotSupported,
PUMErrorCantSaveCard
};

+(NSError *)toNSError:(int)errorCode
Expand Down
5 changes: 5 additions & 0 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMUIConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
//sets the Merchant display name of the Plug and Play SDK UI
+(void) setMerchantDisplayName:(NSString *)merchantDisplayName;

//When Sent YES, it disables the exit alert on bank page, app gets back to merchant app immideatly after the back press
+(void)setExitAlertOnBankPageDisabled:(BOOL)isDisabled;

+(UIColor *)getTopBarColor;

+(UIColor *)getTopTitleTextColor;
Expand All @@ -60,5 +63,7 @@

+(NSString *)getMerchantDisplayName;

+(BOOL)isExitAlertOnBankPageDisabled;

+ (unsigned int)intFromHexString:(NSString *)hexStr;
@end
6 changes: 6 additions & 0 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PUMUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import <Foundation/Foundation.h>
#import "PUMInternalConstants.h"
#import "PUMPaymentParam.h"

//// In a header file
typedef enum {
Expand Down Expand Up @@ -112,6 +113,7 @@ typedef enum {
+(double)calculateConvFeesForPaymentMode:(NSString*)paymentMode
andModeType:(NSString*)modeType;

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

/*!
* Get base URL to be used with the APIs or WebView for currently active environment
Expand Down Expand Up @@ -144,4 +146,8 @@ typedef enum {

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

+(NSString *)getAuthTypeFromAuth:(NSString *) otpOrPassword;

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

@end
9 changes: 9 additions & 0 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PayUMoneyCoreSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ typedef void (^PUMPaymentCompletionBlock)(NSDictionary *response ,NSError *error

- (void)verifyOTPOrPassword:(NSString *) otpOrPassword forMobileOrEmail:(NSString *) mobileOrEmail APIWithCompletionBlock:(PUMRawJSONCompletionBlock)completionBlock;

- (void)getMultipleBinDetailsAPI:(NSArray *)arrCardBin
withCompletionBlock:(PUMRawJSONCompletionBlock)completionBlock;

/**
This API is used to mark txn as user cancelled, when user decides to cancel the transaction
@param completionBlock PUMRawJSONCompletionBlock
*/
- (void)markTxnCancelWithCompletionBlock:(PUMRawJSONCompletionBlock)completionBlock;
//

+ (BOOL)destroy;
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 modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBRegenerateOTPView.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBRegisterOption.nib
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 modified CoreSDK/PayUMoneyCoreSDK.framework/PayUMoneyCoreSDK
Binary file not shown.
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.1"
s.version = "3.2"
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.1" }
s.source = { :git => "https://github.com/payu-intrepos/PayUMoney-IOS-SDK.git", :tag => "PayUmoney_CoreSDK.3.2" }

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.1"
s.version = "2.2"
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.1" }
s.source = { :git => "https://github.com/payu-intrepos/PayUMoney-IOS-SDK.git", :tag => "PayUmoney_PnP.2.2" }

s.ios.deployment_target = '8.0'
s.requires_arc = true
Expand Down
Binary file modified PlugNPlay/PlugNPlay.framework/Assets.car
Binary file not shown.
12 changes: 12 additions & 0 deletions PlugNPlay/PlugNPlay.framework/Headers/PlugNPlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,18 @@ typedef void (^PaymentCompletionHandler)(NSDictionary *paymentResponse, NSError
//When Sent YES, it disables the Netbanking payment UI in the Plug and Play Payment UI
+(void)setDisableNetbanking:(BOOL)isDisabled;

//When Sent YES, it disables the Third party wallet payment UI in the Plug and Play Payment UI
+(void)setDisableThirdPartyWallet:(BOOL)isDisabled;

//When Sent YES, it disables the payment Completion Screen, app gets back to merchant app immideatly after the payment
+(void)setDisableCompletionScreen:(BOOL)isDisabled;

//When Sent YES, it disables the exit alert on checkout page, app gets back to merchant app immideatly after the back press
+(void)setExitAlertOnCheckoutPageDisabled:(BOOL)isDisabled;

//When Sent YES, it disables the exit alert on bank page, app gets back to merchant app immideatly after the back press
+(void)setExitAlertOnBankPageDisabled:(BOOL)isDisabled;

//sets the top bar color of the Plug and Play SDK UI
+(void)setTopBarColor:(UIColor *)color;

Expand Down Expand Up @@ -59,7 +68,10 @@ typedef void (^PaymentCompletionHandler)(NSDictionary *paymentResponse, NSError
+(BOOL)disableWallet;
+(BOOL)disableCards;
+(BOOL)disableNetbanking;
+(BOOL)disableThirdPartyWallet;
+(BOOL)disableCompletionScreen;
+(BOOL)isExitAlertOnCheckoutPageDisabled;
+(BOOL)isExitAlertOnBankPageDisabled;

+(UIColor*)topBarColor;
+(UIColor*)topTitleTextColor;
Expand Down
15 changes: 15 additions & 0 deletions PlugNPlay/PlugNPlay.framework/Headers/PnPUtility.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,19 @@
+(NSDecimalNumber *)roundUpNumberTo2DecimalPlaces:(NSDecimalNumber *) number;
+(NSString *)getDisplayCardNameForCardNumber:(NSString *)cardNumber pg:(NSString *) pg;
+(BOOL)isAmexCard:(NSString *)cardNumber;

+ (NSArray *)topNBBanks;

+ (void)saveTopNBBanks:(NSArray *)topNBBanks;

+ (void)usedNBForBank:(NSString *)bankName andBankCode:(NSString *)bankCode;

+ (NSArray *)selectedWallets;

+ (void)usedWallet:(NSString *)name code:(NSString *)code;
+ (void)saveTopWallets:(NSArray *)topWallets;

+ (NSArray *)getCardBinsArrayFromStoredCardArray:(NSArray *) arr;
+(NSString *)getDisplayCardNameForBankName:(NSString *)bankName pg:(NSString *) pg;

@end
4 changes: 2 additions & 2 deletions PlugNPlay/PlugNPlay.framework/Headers/PnPWalletPayConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ typedef enum{
PNPTapTypeNetBank,
PNPTapTypeWalletAndCard,
PNPTapTypeWalletAndNetBank,
PNPTapTypeNone

PNPTapTypeNone,
PNPTapType3PWallet
} PNPTapType;

#endif /* PnPWalletPayConstants_h */
Binary file modified PlugNPlay/PlugNPlay.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified PlugNPlay/PlugNPlay.framework/Plug-N-Play.storyboardc/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified PlugNPlay/PlugNPlay.framework/PlugNPlay
Binary file not shown.
Binary file modified PlugNPlay/PlugNPlay.framework/PnPVerifyOTPPasswordVC.nib
Binary file not shown.

0 comments on commit c69fb3b

Please sign in to comment.