整合magtek idynamo usaepay

时间:2016-07-19 07:39:06

标签: java ios objective-c

是否有任何人为ios app集成了idynamo usa。我刚刚整合但遇到了一些问题。这是我在IOS App中的代码:

 NSString *responseString = [(MTSCRA*)instance getResponseData];
    NSData *responseData = [responseString dataUsingEncoding:NSASCIIStringEncoding];
    NSString *encodedString = [NSString stringWithFormat:@"enc://%@", [responseData base64EncodedString]];

我将此编码字符串发送到网关方式。

这段代码,我用java服务器编写:

String magStrip="enc://JUU/OzU0ODU2NioqKioqKjM3NzQ9MTcxMCoqKioqKioqKioqKioqKio/fDA2MDB8JUU/fENGREY0RTZBRTFFMkJGNTFDMEU5M0VCRTFEQzY5NDcxQjUyMDk2QjJCRDVBQjIwQkY5N0U1N0E5Mzc3NUUxMzdBRTVGMDA5REJEMTI2REREfHw2MTQwMDIwMHwyRTNGRjNEQjdGRTRCQzU5QUY3OThCNDdEMTlDQjVDQkEzMEU5NDNCRjg2OTVFRkFBRURBNkNCRkUzMTRGN0ZGNUE5QTVBQjQyMzBFRkUzNEJBMEUxMDRCRjFDQjhGQTJEMEIzMThGNjkwMERCNUJCfEIzMzlBQzAwNDAxMTZBQXxBRUJERUQ0MTg2QUQxREI4fDkwMTE4ODBCMzM5QUMwMDAwMDIwfDI4OEN8fDAwMDA=";           card.setMagStripe(magStrip);            
params.setCreditCardData(card);             
RunSale request = new RunSale();            
request.setToken(token);            
request.setParams(params);          
com.usaepay.api.jaxws.TransactionResponse response;
response = client.runSale(token, params);

当我在服务器中呼叫时,我会回复:

  

无法解析条纹mag。

0 个答案:

没有答案