ios - 如何将 PhoneGap 移动应用与 ApplePay 和 Stripe 集成
<p><div>
<aside class="s-notice s-notice__info post-notice js-post-notice mb16"role="status">
<div class="d-flex fd-column fw-nowrap">
<div class="d-flex fw-nowrap">
<div class="flex--item wmn0 fl1 lh-lg">
<div class="flex--item fl1 lh-lg">
<b>已结束。</b>此问题不符合 <a href="https://stackoverflow.com/help/closed-questions" rel="noreferrer noopener nofollow">Stack Overflow guidelines</a> .它目前不接受答案。
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>这是它的代码片段。调用这个方法会调用apple pay的controllersheet</p>
<pre><code>-(void)handlesApplePay
{
@try {
PKPaymentSummaryItem *paymentSummary = ];
NSArray *summaryItem = [ initWithObjects:paymentSummary, nil];
//Creates the type of credit card it wil support
NSArray *supportPaymentType = [ initWithObjects:PKPaymentNetworkAmex, PKPaymentNetworkMasterCard, PKPaymentNetworkVisa, nil];
PKPaymentRequest *paymentRequest = [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 = [initWithPaymentRequest:paymentRequest];
paymentAuthController.delegate = self;
;
}
@catch (NSException *exception) {
}
}
</code></pre></p>
<p style="font-size: 20px;">关于ios - 如何将 PhoneGap 移动应用与 ApplePay 和 Stripe 集成,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/26200683/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/26200683/
</a>
</p>
页:
[1]