0
Braintree SDKを私のapp.Myアプリに組み込みます。Swift言語でビルドします。私の質問は、私がiOS SDKを使っているのであれば、それはサーバ側でpaymentMethodNonceの設定が必要なのでしょうか?Braintree iOS v4 SDK
Braintree SDKを私のapp.Myアプリに組み込みます。Swift言語でビルドします。私の質問は、私がiOS SDKを使っているのであれば、それはサーバ側でpaymentMethodNonceの設定が必要なのでしょうか?Braintree iOS v4 SDK
はBraintree
// Example: Tokenize the Apple Pay payment
BTApplePayClient *applePayClient = [[BTApplePayClient alloc]
initWithAPIClient:self.braintreeClient];
[applePayClient tokenizeApplePayPayment:payment
completion:^(BTApplePayCardNonce *tokenizedApplePayPayment,
NSError *error)
{
if (tokenizedApplePayPayment)
{
NSLog(@"nonce = %@", tokenizedApplePayPayment.nonce);
}
else
{
// Tokenization failed. Check `error` for the cause of the failure.
// Indicate failure via the completion callback:
completion(PKPaymentAuthorizationStatusFailure);
}
}];
を使用して
Apple Pay
ため
Nonce
を生成
Braintree
BTPayPalRequest *request= [[BTPayPalRequest alloc] initWithAmount:amount];
request.currencyCode = @"USD"; // Optional; see BTPayPalRequest.h for other options
[payPalDriver requestOneTimePayment:request completion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error)
{
if (tokenizedPayPalAccount)
{
NSLog(@"Got a nonce: %@", tokenizedPayPalAccount.nonce);
}
else {
// Buyer canceled payment approval
// Tokenization failed. Check `error` for the cause of the failure.
}
}];
を使用してPayPal
ためNonce
を生成します