2017-07-13 10 views
0

iOSで支払いを実行しようとしています。 https://developers.braintreepayments.com/start/hello-client/ios/v4Braintree iOSインテグレーション

カード番号「4111111111111111」を追加した後、私は次のことを完全に盲目にしていますか? 今、私はサーバーを持っていません。

質問:

1) "4111111111111111" カードの有効期限は何ですか?

2)カードタップを追加した後、取引を完了するために次のステップは何ですか?

3)正常なトランザクションには自分のサーバーが必要ですか?

は、私はそれが私のために正常に動作していますスウィフトにしようとした、

答えて

0

、ありがとうございました。私は、チェック以下のコードを添付し、私に知らせてください:

var braintree: Braintree? 
    braintree = Braintree(clientToken: "") 



    func userDidCancelPayment() { 
     self.dismiss(animated: true, completion: nil) 
    } 

    func drop(_ viewController: BTDropInViewController!, didSucceedWith paymentMethod: BTPaymentMethod!) { 

     print(paymentMethod.nonce) 

     // Send payment method nonce to your server 

     dismiss(animated: true, completion: nil) 
     let alert = UIAlertController(title: "Alert", message: "Send payment method nonce to your server Sucessfully", preferredStyle: UIAlertControllerStyle.alert) 
     alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.default, handler: nil)) 
     self.present(alert, animated: true, completion: nil) 

    } 

func tappedMyPayButton() 
{ 
let dropInViewController = braintree!.dropInViewController(with: self) 
     dropInViewController.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.cancel, target: self, action: #selector(PaymentVController.userDidCancelPayment)) 

     let navigationController = UINavigationController(rootViewController: dropInViewController) 
     self.present(navigationController, animated: true, completion: nil) 
    } 



    func drop(inViewControllerDidCancel viewController: BTDropInViewController!) { 
     dismiss(animated: true, completion: nil) 
    } 

ビザ:4242 4242 4242 4242 マスター:5555 5555 5555 4444 アメリカン・エキスプレス:3782 822463 10005 重要な注意:任意の将来の有効期限を使用して、名前にカード、CVC、Billing Zipをテストモードで使用します。

関連する問題