citruspay / citruspay-ios-sdk

Enhanced iOS SDK for Superior Native Payments Experience
MIT License
4 stars 1 forks source link

Bill URL issue #11

Closed alokvnair closed 8 years ago

alokvnair commented 8 years ago

I am trying append custom parameters to the bill url and pass that bill url to the sdk. e.g. https://salty-plateau-1529.herokuapp.com/billGenerator.sandbox.php?id=10

In Android CitrusPaySDK on doing this way the amount parameter is appended to the url as https://salty-plateau-1529.herokuapp.com/billGenerator.sandbox.php ?id=10&amount=3.00

But iOS SDK is not checking whether there is already a parameter in url and it appends amount to the url to form the request url like below https://salty-plateau-1529.herokuapp.com/billGenerator.sandbox.php ?id=10?amount=3.00

Because of this error is occurring in Bill Generator. Please fix this logic issue in your SDK ASAP.

bharath-kamath commented 8 years ago

In IOS the Citrus SDK has limitation that you cannot pass params in the bill URL. This is different from android. So use below method to pass amount only.

+(void)requestBillAmount:(NSString *)amount billURL:(NSString *)billUrl callback:(ASBillCallback)callback;

So the question is how do we pass our custom params like id etc ? As per the documentation it can be passed as a NSDictionary (custom params) but on successful transaction our server is not getting this custom params dictionary.

- (void)requestChargePayment:(CTSPaymentDetailUpdate*)paymentInfo withContact:(CTSContactUpdate*)contactInfo withAddress:(CTSUserAddress*)userAddress bill:(CTSBill *)bill customParams:(NSDictionary *)custParams

Now question is why is the SDK not forwarding custom params? This is reproducible on the sample as well. cc - @mukesh122 @Pratima-Gadekar

Pratima-Gadekar commented 8 years ago

@bharath-kamath you need to enable custom parameters for your merchant account on the Citrus Panel to achieve the same. Please refer "How to add custom parameters on panel?" at https://developers.citruspay.com/documentation/mobile-payments/unified-mobile-sdk/faqs/