问题描述
我正在我的应用程序中使用 CyberSource 集成 Apple Pay 集成。我不清楚网络资源,我已经创建了商家 ID 并集成到我的代码中,如下所示
PKPaymentRequest*request = [[PKPaymentRequest alloc]init];
request.merchantIdentifier = @"com.ID";//Example
request.supportednetworks = @[PKPaymentNetworkVisa,PKPaymentNetworkMasterCard,PKPaymentNetworkAmex];
request.merchantCapabilities = PKMerchantCapability3DS;
request.countryCode = @"AE";
request.currencyCode = @"AED";
PKPaymentSummaryItem *item = [[PKPaymentSummaryItem alloc] init];
item.label=@"Merchant";
item.amount=[NSDecimalNumber decimalNumberWithString:@"1"];
request.paymentSummaryItems=@[item];
PKPaymentAuthorizationViewController *viewController1 = [[PKPaymentAuthorizationViewController alloc] initWithPaymentRequest:request];
viewController1.delegate = self;
[self presentViewController:viewController1 animated:YES completion:nil];
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didAuthorizePayment:(PKPayment *)payment completion:(void (^)(PKPaymentAuthorizationStatus))completion {
NSLog(@"%@",[payment.token description]);
NSLog(@"data%@",payment.token.paymentData);
NSLog(@"description===%@",payment.token.paymentData.description);
NSLog(@"Payment was authorized token: %@",payment.token.transactionIdentifier);
NSLog(@"%@",payment);
NSDictionary *response = [NSJSONSerialization JSONObjectWithData:payment.token.paymentData options:NSJSONReadingallowFragments error:nil];
NSLog(@"JSON Output: %@",response);
// NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&jsonError];
}
请帮助我下一步如何处理 Cybersource,我的付款或不反映在 Cybersource 中。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)