如何解决使用 Cybersource 的 Apple Pay 集成 -objective C
我正在我的应用程序中使用 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 举报,一经查实,本站将立刻删除。