2
您是否可以使用Stripe將ApplePay添加到iOS PhoneGap應用程序?如何將PhoneGap移動應用程序與ApplePay和條紋集成
您是否可以使用Stripe將ApplePay添加到iOS PhoneGap應用程序?如何將PhoneGap移動應用程序與ApplePay和條紋集成
這是它的代碼片段。調用此方法將調用Apple Pay的控制器表格
-(void)handlesApplePay
{
@try {
PKPaymentSummaryItem *paymentSummary = [PKPaymentSummaryItem summaryItemWithLabel:@"Credit Card" amount:[NSDecimalNumber decimalNumberWithString:@"20.00"]];
NSArray *summaryItem = [[NSArray alloc] initWithObjects:paymentSummary, nil];
//Creates the type of credit card it wil support
NSArray *supportPaymentType = [[NSArray alloc] initWithObjects:PKPaymentNetworkAmex, PKPaymentNetworkMasterCard, PKPaymentNetworkVisa, nil];
PKPaymentRequest *paymentRequest = [[PKPaymentRequest alloc]init];
//This is the merchant id you create from the provisioing profile page
//developer.apple.com
paymentRequest.merchantIdentifier = @"merchant.com.ApplePay";
paymentRequest.paymentSummaryItems = summaryItem;
paymentRequest.countryCode = @"EN";
paymentRequest.currencyCode = @"USD";
paymentRequest.supportedNetworks = supportPaymentType;
paymentRequest.merchantCapabilities = PKMerchantCapabilityEMV;
PKPaymentAuthorizationViewController *paymentAuthController = [[PKPaymentAuthorizationViewController alloc]initWithPaymentRequest:paymentRequest];
paymentAuthController.delegate = self;
[self presentViewController:paymentAuthController animated:YES completion:nil];
}
@catch (NSException *exception) {
}
}
您的意思是除了所鏈接的所有參考文檔之外嗎? – Paulw11 2014-10-05 07:54:39
@ Paulw11是的。 Stripe只有一個用於本地應用程序集成的指南和庫。 – dpaluy 2014-10-05 08:22:08