After all, you need to set the PROVIDER_URL
in your environment variables which will be the endpoint that you will get the url
, auth
and schema
data from provider.
This endpoint needs to return these values, being:
-
a
string
for theurl
-
an
object
for theauth
with:type
of auth (e.g. Header, URI)body
of auth (e.g. Bearer, Token)
-
a
json schema object
for theschema
These three parameters will be usual for request data and create a checkout.
- The
url
will be the url for checkout. - The
auth
is the way how your request will be authenticate. - The
schema
will validate withjson schema
if your payload, sending by parameter in Cashier init, it's right.
docker build -t cashier -f Dockerfile .
docker run
cashier = Cashier(payload=payload)
if cashier.is_valid():
cashier.create_checkout()
- unit test