We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey
I was able to login successfully, however when i try to charge an account, i keep getting Error Code Transaction failed, invalid input. Error Code 18
Code -(void)mobileDeviceLoginSucceeded:(MobileDeviceLoginResponse *)response{ NSString *sessionToken=[response sessionToken]; KioskUtils *myUtils=[[KioskUtils alloc]init]; NSMutableDictionary *tableDict=[[[NSUserDefaults standardUserDefaults] objectForKey:@"ticketData"] mutableCopy]; NSString *totalStr=@"0.01";//[NSString stringWithFormat:@"%.2f",[[tableDict objectForKey:@"total"] doubleValue] ]; NSString *tipAmtStr=@"0.01";//[NSString stringWithFormat:@"%.2f",[[tableDict objectForKey:@"tip"] doubleValue] ]; NSString *taxAmtStr=@"0.00";//[NSString stringWithFormat:@"%.2f",[[tableDict objectForKey:@"tax"] doubleValue] ]; AnetEMVManager *manager= [AnetEMVManager initWithCurrecyCode:@"USD" terminalID:@"xxxxxx" skipSignature:TRUE showReceipt:FALSE]; [manager setLoggingEnabled:TRUE]; [manager setTerminalMode:AnetEMVModeInsertOrSwipe]; LineItemType *lineItem=[LineItemType lineItem]; [lineItem setItemName:@"Test"]; [lineItem setItemID:@"1"]; [lineItem setItemQuantity:@"1"]; AnetEMVTransactionRequest *request=[AnetEMVTransactionRequest transactionRequest]; NSMutableArray *lineItems=[NSMutableArray new]; [lineItems addObject:lineItem]; [request setLineItems:lineItems]; ANetApiRequest *apiRequest=[ANetApiRequest anetApiRequest]; MerchantAuthenticationType *auth=[MerchantAuthenticationType merchantAuthentication]; [auth setSessionToken:sessionToken]; [auth setMobileDeviceId:[myUtils getMacAddress]];
[apiRequest setMerchantAuthentication:auth]; [request setAnetApiRequest:apiRequest]; int r = arc4random_uniform(1000000000) + 1; OrderType *orderType=[OrderType order]; [orderType setInvoiceNumber:[NSString stringWithFormat:@"%d",r]]; [orderType setOrderDescription:@"Gold Coast valet"]; [request setOrder:orderType]; [request setAmount:totalStr]; ExtendedAmountType *tip=[ExtendedAmountType extendedAmountType]; [tip setAmount:tipAmtStr]; [tip setName:@"tip"]; ExtendedAmountType *tax=[ExtendedAmountType extendedAmountType]; [tax setName:@"tax"]; [tax setAmount:taxAmtStr]; //[request setTip:tip]; //[request setTax:tax]; [request setEmvTransactionType:EMVTransactionType_Payment]; [manager setConnectionMode:AnetEMVConnectionModeBluetooth];
[manager startQuickChipWithTransactionRequest:request forPaperReceiptCase:false presentingViewController:self completionBlock:^(AnetEMVTransactionResponse * _Nullable response, AnetEMVError * _Nullable error) { if([response isTransactionSuccessful]){ ................ } }else{ NSLog(@"failed .."); } } andCancelActionBlock:^{ NSLog(@"failed .."); }];
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey
I was able to login successfully, however when i try to charge an account, i keep getting
Error Code
Transaction failed, invalid input.
Error Code 18
Code
-(void)mobileDeviceLoginSucceeded:(MobileDeviceLoginResponse *)response{
NSString *sessionToken=[response sessionToken];
KioskUtils *myUtils=[[KioskUtils alloc]init];
NSMutableDictionary *tableDict=[[[NSUserDefaults standardUserDefaults] objectForKey:@"ticketData"] mutableCopy];
NSString *totalStr=@"0.01";//[NSString stringWithFormat:@"%.2f",[[tableDict objectForKey:@"total"] doubleValue] ];
NSString *tipAmtStr=@"0.01";//[NSString stringWithFormat:@"%.2f",[[tableDict objectForKey:@"tip"] doubleValue] ];
NSString *taxAmtStr=@"0.00";//[NSString stringWithFormat:@"%.2f",[[tableDict objectForKey:@"tax"] doubleValue] ];
AnetEMVManager *manager= [AnetEMVManager initWithCurrecyCode:@"USD" terminalID:@"xxxxxx" skipSignature:TRUE showReceipt:FALSE];
[manager setLoggingEnabled:TRUE];
[manager setTerminalMode:AnetEMVModeInsertOrSwipe];
LineItemType *lineItem=[LineItemType lineItem];
[lineItem setItemName:@"Test"];
[lineItem setItemID:@"1"];
[lineItem setItemQuantity:@"1"];
AnetEMVTransactionRequest *request=[AnetEMVTransactionRequest transactionRequest];
NSMutableArray *lineItems=[NSMutableArray new];
[lineItems addObject:lineItem];
[request setLineItems:lineItems];
ANetApiRequest *apiRequest=[ANetApiRequest anetApiRequest];
MerchantAuthenticationType *auth=[MerchantAuthenticationType merchantAuthentication];
[auth setSessionToken:sessionToken];
[auth setMobileDeviceId:[myUtils getMacAddress]];
[manager startQuickChipWithTransactionRequest:request forPaperReceiptCase:false presentingViewController:self completionBlock:^(AnetEMVTransactionResponse * _Nullable response, AnetEMVError * _Nullable error) {
if([response isTransactionSuccessful]){
................
}
}else{
NSLog(@"failed ..");
}
} andCancelActionBlock:^{
NSLog(@"failed ..");
}];
}
The text was updated successfully, but these errors were encountered: