diff --git a/blockchain_integration/pi_network/payment_gateways/square.py b/blockchain_integration/pi_network/payment_gateways/square.py index 6c848f416..2a6dade13 100644 --- a/blockchain_integration/pi_network/payment_gateways/square.py +++ b/blockchain_integration/pi_network/payment_gateways/square.py @@ -1,5 +1,6 @@ import squareconnect + class SquarePaymentGateway: def __init__(self, access_token): self.access_token = access_token @@ -8,12 +9,9 @@ def __init__(self, access_token): def create_payment(self, amount, currency): transaction_api = squareconnect.TransactionsApi() request_body = { - 'amount_money': { - 'amount': int(amount * 100), - 'currency_code': currency - }, - 'payment_method_types': ['CARD'], - 'idempotency_key': squareconnect.util.random_string(32) + "amount_money": {"amount": int(amount * 100), "currency_code": currency}, + "payment_method_types": ["CARD"], + "idempotency_key": squareconnect.util.random_string(32), } response = transaction_api.create_transaction(request_body) return response