2017-07-22 9 views
0

私のアプリケーションでは、私はそれを提供する必要があります、クライアントはクレジットカードを使用して支払う必要があります。 PaypalモバイルSDKはそれをサポートしていません。iOS:段階的なPayPal braintreeの統合

私は脳のツリーを統合する必要がありますが、私はそれを統合するための適切な手順を見つけました。

誰でも私のアプリケーションでpaypal braintreeを統合するのを手伝ってください。

+0

https://developers.braintreepayments.com/start/hello-client/ios/v4 – radkrish

+0

私は上記のリンクは、より – radkrish

+0

十分すぎるほどのおかげであると考えています。私はこのリンクを通過しましたが、支払い金額と受信者の詳細を設定する場所のような疑問があります。また、サーバーの設定で、URLを作成する方法と、paypalへの接続が確立されている場所から行う方法があります。 –

答えて

1

是非!

以下の詳細については、ドキュメントを検索してください。

https://developers.braintreepayments.com/guides/paypal/client-side/ios/v4

#import "BraintreePayPal.h" 

- (void)viewDidLoad { 
[super viewDidLoad]; 

self.braintreeClient = [[BTAPIClient alloc] initWithAuthorization:@"<#CLIENT_AUTHORIZATION#>"]; 

UIButton *customPayPalButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 60, 120)]; 
[customPayPalButton addTarget:self 
         action:@selector(customPayPalButtonTapped:) 
      forControlEvents:UIControlEventTouchUpInside]; 
[self.view addSubview:customPayPalButton]; 
} 


- (IBAction)customPayPalButtonTapped:(id)sender { 
BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:self.braintreeClient]; 
payPalDriver.viewControllerPresentingDelegate = self; 
payPalDriver.appSwitchDelegate = self; // Optional 

// Start the Vault flow, or... 
[payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { 
    ... 
}]; 

// ...start the Checkout flow 
BTPayPalRequest *request = [[BTPayPalRequest alloc] initWithAmount:@"1.00"]; //Here you need to enter the amount 
[payPalDriver requestOneTimePayment:request 
         completion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { 
    ... 
}]; 
} 
+0

あなたはあなたのアプリケーションの中でBraintreeの統合に成功しましたか? –

+0

はい、私は過去に行った – radkrish

+0

私を個人的に案内してもらえますか? –