2016-04-24 4 views
6

私は自分のアプリのいずれかにストライプ支払いを追加しようとしているiOS開発者です。私は支払いを処理しようとすると、私は「禁断の(403)」エラーが表示さホームサーバーでストライプ支払いを処理する際に禁止(403)エラーが発生しました

https://stripe.com/docs/charges

:私は下のリンクから提案されたコードをホストしている私のSSLサイトのページを作成しました。誰も私が間違っている可能性があることを助言してもらえますか?次のように私のRubyファイル内のコードのすべてがある:

stripe.api_key = "MySecretKeyGoesHere" 

token = request.POST['stripeToken'] 

try: 
    charge = stripe.Charge.create(
    amount=1000, # amount in cents, again 
    currency="gbp", 
    source=token, 
    description="Example charge" 
) 
except stripe.error.CardError, e: 
# The card has been declined 
pass 

多くの主要言語で、このための例がありますが、私はそれらのいずれかを使用して幸せが、現在はRubyやPythonのバージョンをしようとしています。

+0

ストリーミングペイメントにライブモードまたはテストモードを使用していますか? – Jitendra

+0

私はライブモードで働いています –

+0

Pythonの識別子を引用符でインポートするにはどうすればいいですか?魔法使いですか? ^^ – CodenameLambda

答えて

0

int量= 10000; // $ 100.00 int applicationFee = int(量* 0.3); // 30%のシェア

Map<String, Object> chargeParams = new HashMap<String, Object>(); 
chargeParams.put("amount", amount); 
chargeParams.put("currency", "usd"); 
chargeParams.put("description", "Example charge"); 
chargeParams.put("customer", customerId); // customerId is the ID of the customer object for the paying person  
chargeParams.put("destination", accountId); // accountId is the ID of the account object for the vendor that should be paid 
chargeParams.put("application_fee", applicationFee); 
Charge.create(chargeParams); 
  1. あなたは、サーバー側の設定で正しいライブ秘密鍵ライブ発行可能キーを使用している場合も確認してください。https://dashboard.stripe.com/account/details
    身元確認:ストライプであなたの接続されたアカウントを確認しhttps://dashboard.stripe.com/logs?method=not_get
  2. アカウントの詳細を支払いを処理している間、あなたが直面している正確な問題が何であるかを確認するために

  3. チェックアカウントログhttps://stripe.com/docs/connect/identity-verification

  4. ドキュメントリンク: -
    [1] https://stripe.com/docs/api#create_charge
    [2] https://stripe.com/docs/api#create_transfer
    [3] https://stripe.com/docs/api#create_refund
    [4] https://stripe.com/docs/api#balance_object
    [5] https://stripe.com/docs/connect/payments-fees#charging-directly
    [6] https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header
    [7] https://stripe.com/docs/connect/payments-fees#charging-through-the-platform
+1

これが何を解決し、どこに行くのか説明していただけますか?ありがとう –

+0

あなたの口座残高を確認して、支払い処理を行うのに十分な残高があることを確認してください。料金を作成する際に利用可能な残高を印刷してください。 また、サーバー側の設定で正しい秘密鍵と公開鍵を使用しているかどうかを確認してください。 – Jitendra

+0

ライブストライプサーバーがありますか? –

関連する問題