File: nonces.py

package info (click to toggle)
python-braintree 3.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,376 kB
  • ctags: 1,998
  • sloc: python: 13,634; makefile: 73; sh: 8
file content (17 lines) | stat: -rw-r--r-- 647 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from tests.test_helper import *

class Nonces(object):
    Transactable = "fake-valid-nonce"
    Consumed = "fake-consumed-nonce"
    PayPalOneTimePayment = "fake-paypal-one-time-nonce"
    PayPalFuturePayment = "fake-paypal-future-nonce"

    @staticmethod
    def nonce_for_paypal_account(paypal_account_details):
        client_token =json.loads(TestHelper.generate_decoded_client_token())
        client = ClientApiHttp(Configuration.instantiate(), {
            "authorization_fingerprint": client_token["authorizationFingerprint"]
        })

        status_code, nonce = client.get_paypal_nonce(paypal_account_details)
        return nonce