I have integrated Payeezy in my iOS app. It is working fine.
Now I am testing payment for India. I have entered all credit card information. I have enter amount as 1 $ in amount field but payment was deducted as 0.01 $.
I have used following code:
NSString *amount = @"1";
NSDictionary* credit_card = @{
@"type":@"mastercard",
@"cardholder_name":cardHolderName,
@"card_number":cardNumber,
@"exp_date":@"1120",
@"cvv":cardSecurityCode
};
PayeezySDK* myClient = [[PayeezySDK alloc]initWithApiKey:KPayApiKey apiSecret:KPayApiSecret merchantToken:KPayToken url:KURL];
[myClient submitAuthorizeTransactionWithCreditCardDetails:credit_card[@"type"] cardHolderName:credit_card[@"cardholder_name"] cardNumber:credit_card[@"card_number"] cardExpirymMonthAndYear:credit_card[@"exp_date"] cardCVV:credit_card[@"cvv"] currencyCode:@"USD" totalAmount:amount merchantRefForProcessing:@"372275578881"
completion:^(NSDictionary *dict, NSError *error)
{
NSString *authStatusMessage = nil;
if (error == nil)
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@""
message:authStatusMessage delegate:self
cancelButtonTitle:@"Thank You"
otherButtonTitles:nil];
[alert show];
}
else
{
authStatusMessage = [NSString stringWithFormat:@"Error was encountered processing transaction"];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"First Data Payment Authorization"
message:authStatusMessage delegate:nil
cancelButtonTitle:@"Dismiss"
otherButtonTitles:nil];
[alert show];
}
}];
What is the issue? Please help me to solve this problem.
Hi Priyadarshan,
The amount that you send to our APIs must be in cents. For example, you will need to send amount = 100 if you intend to charge $1.
Regards,
Payeezy team
Is it only for India or world wide?
Means should I multiply by 100 for all countries or just for India?
Thank you
Can you explain your question a bit more? The APIs require the amount to be in cents (or the equivalent in other currencies).
Regards,
Payeezy team.