2012-03-19 18 views
1

私はPayPalのAdaptive Payments APIのPythonバインディングを開発していますが、現在は並列/連鎖支払いの呼び出しを実装していますが、PayPal Adaptive Payments APIで複数の受信者が失敗する

パラメータを持つPay API Operationで説明するように、次のように私はすでに基本的な「PAY」操作を実装しました:

{'actionType': 'PAY', 
'cancelUrl': 'http://my_domain.com/cancel_url', 
'clientDetails.applicationId': 'My Application ID', 
'clientDetails.ipAddress': 'MY IP', 
'currencyCode': 'USD', 
'receiverList.receiver(0).amount': 15, 
'receiverList.receiver(0).email': '[email protected]', 
'requestEnvelope.detailLevel': 'ReturnAll', 
'requestEnvelope.errorLanguage': 'en_US', 
'returnUrl': 'http://my_domain.com/cancel_url'} 

そして、それは本当によく働いているが、私はreceiverListオブジェクト内の複数の受信器を追加しようとすると、ペイパルのは私に何も言わないエラーを返す:

{'error(0).category': ['Application'], 
'error(0).domain': ['PLATFORM'], 
'error(0).errorId': ['580001'], 
'error(0).message': ['Invalid request: {0}'], 
'error(0).severity': ['Error'], 
'error(0).subdomain': ['Application'], 
'responseEnvelope.ack': ['Failure'], 
'responseEnvelope.build': ['2486531'], 
'responseEnvelope.correlationId': ['f454f1118f799'], 
'responseEnvelope.timestamp': ['2012-03-18T17:48:10.534-07:00']} 

をそして、それはすべて、リクエストが無効であるところ、それは状態はありませんし、私は本当に追加する設定された第1パラメータを変更するに何かを見つけることができないのです:

'receiverList.receiver(1).amount': 15, 
'receiverList.receiver(1).email': '[email protected]' 

私はSandboxのチェーン/パラレルの支払いをテストするために何かを有効にする必要がありますか、私が送信するために、基本的なヘッダー/ paramsは、いくつかの設定を忘れてしまったのですか?私はそれがなったPythonの辞書として体を実装したとしてPayPalを接触させた後の任意の助け

答えて

2

ため

おかげで、彼らは、順番にreceiverListオブジェクトを送信しようとする例:

{'actionType': 'PAY', 
'cancelUrl': 'http://my_domain.com/cancel_url', 
'clientDetails.applicationId': 'My Application ID', 
'clientDetails.ipAddress': 'MY IP', 
'currencyCode': 'USD', 
'receiverList.receiver(0).amount': 15, 
'receiverList.receiver(0).email': '[email protected]', 
'receiverList.receiver(1).amount': 15, 
'receiverList.receiver(1).email': '[email protected]', 
'requestEnvelope.detailLevel': 'ReturnAll', 
'requestEnvelope.errorLanguage': 'en_US', 
'returnUrl': 'http://my_domain.com/cancel_url'} 

を教えてくれました私はOrderedDictを使い始めました:)

+0

これは私のために働いた。良いヒント。 – DavidWinterbottom

関連する問題