0

これが私がしていることであり、paypal-pythongitリポジトリはhttps://github.com/duointeractive/paypal-pythonです

仮想環境を作成するpipinstallpaypal pip install nose

site-packages / paypalディレクトリで、testsディレクトリをコピーします。

cp api_details_blank.py api_details.py

私のapi_user_name、パスワード、署名、および顧客のクレジットアカウント情報を入力します

nosetestsテスト/

それをした後、私が得たのは

...EEE.E...
======================================================================
ERROR: test_abbreviated_sale (paypal.tests.test_direct_payment.TestDirectPayment)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/tests/test_direct_payment.py", line 51, in test_abbreviated_sale
    sale = interface.do_direct_payment(**self.credit_card)
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/interface.py", line 270, in do_direct_payment
    return self._call('DoDirectPayment', **kwargs)
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/interface.py", line 125, in _call
    raise PayPalAPIResponseError(response)
PayPalAPIResponseError: None (Error Code: -1)


ERROR: test_authorize_and_delayed_capture (paypal.tests.test_direct_payment.TestDirectPayment)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/tests/test_direct_payment.py", line 61, in test_authorize_and_delayed_capture
    auth = interface.do_direct_payment('Authorization', **self.credit_card)
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/interface.py", line 270, in do_direct_payment
    return self._call('DoDirectPayment', **kwargs)
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/interface.py", line 125, in _call
    raise PayPalAPIResponseError(response)
PayPalAPIResponseError: None (Error Code: -1)

======================================================================
ERROR: test_authorize_and_void (paypal.tests.test_direct_payment.TestDirectPayment)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/tests/test_direct_payment.py", line 74, in test_authorize_and_void
    auth = interface.do_direct_payment('Authorization', **self.credit_card)
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/interface.py", line 270, in do_direct_payment
    return self._call('DoDirectPayment', **kwargs)
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/interface.py", line 125, in _call
    raise PayPalAPIResponseError(response)
PayPalAPIResponseError: None (Error Code: -1)

======================================================================
ERROR: test_sale (paypal.tests.test_direct_payment.TestDirectPayment)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/tests/test_direct_payment.py", line 30, in test_sale
    sale = interface.do_direct_payment('Sale', **self.credit_card)
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/interface.py", line 270, in do_direct_payment
    return self._call('DoDirectPayment', **kwargs)
  File "/Users/binleixue/Envs/tradeplatform/lib/python2.7/site-packages/paypal/interface.py", line 125, in _call
    raise PayPalAPIResponseError(response)
PayPalAPIResponseError: None (Error Code: -1)

----------------------------------------------------------------------
Ran 11 tests in 23.885s

FAILED (errors=4)

誰かがそれに対処する方法を知っていますか?

4

1 に答える 1

0

それでも問題が解決しない場合は、 PayLibを、定期的な支払いのために PayPal Express Checkout の上にある単純な抽象化として作成しました。サンプル コードは readme にあり、PyPI にも掲載されています。

于 2013-01-06T23:46:32.900 に答える