Skip to content

Instantly share code, notes, and snippets.

@jrmaia
Created March 22, 2023 15:17
Show Gist options
  • Select an option

  • Save jrmaia/e2c7e3c703060e36c3930dd5eefb4002 to your computer and use it in GitHub Desktop.

Select an option

Save jrmaia/e2c7e3c703060e36c3930dd5eefb4002 to your computer and use it in GitHub Desktop.
junior@junior iopay-sdk-php % php examples/split/create.php
Array
(
[receiver] => 9f9e387d-f13f-4c64-b7ea-0e2884301d40
[receiver_fee_type] => proportional
[split_type] => percent
[split_value] => 10
[min_amount] => 100
[max_amount] => 100000
[chargeback_liable] => 1
)
---- API Connect ---
https://sandbox.api.iopay.com.br/api/auth/[email protected]&secret=$AIKb~BloVE4DbJc!E-RI6oKq+PC~cn6TVZ-Lssed=iJdb1KW2&io_seller_id=07b53180-6e59-47a1-b1c4-97374fbb6de0
{"email":"[email protected]","secret":"$AIKb~BloVE4DbJc!E-RI6oKq+PC~cn6TVZ-Lssed=iJdb1KW2","io_seller_id":"07b53180-6e59-47a1-b1c4-97374fbb6de0"}
---- API Response ---
Array
(
[access_token] => eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zYW5kYm94LmFwaS5pb3BheS5jb20uYnJcL2FwaVwvYXV0aFwvbG9naW4iLCJpYXQiOjE2Nzk0OTgyMjIsImV4cCI6MTY3OTUwMTgyMiwibmJmIjoxNjc5NDk4MjIyLCJqdGkiOiJtSEFlNEVoTDBmR0V0M0p6Iiwic3ViIjoiOTRjNWFjOTAtNzk1NC00ZGI1LThhYzktYjY0OGU4MjViMzZhIiwicHJ2IjoiODc1NTZkY2YzNmUyNjM4ZTUwOTUzNzE0OWQ1NzUxM2Q4YTI5OTI0NyJ9.c1300f8K5z92LVLUWkeMTbOaOOo3ihx_Ie5SXY-8GRQ
[token_type] => bearer
[expires_in] => 3600
)
---- API Connect ---
https://sandbox.api.iopay.com.br/api/v1/split_rules
{"receiver":"9f9e387d-f13f-4c64-b7ea-0e2884301d40","receiver_fee_type":"proportional","split_type":"percent","split_value":10,"min_amount":100,"max_amount":100000,"chargeback_liable":1}
---- API Response ---
Array
(
[error] => Array
(
[status] => Request Failed
[status_code] => 403
[type] => invalid_request_error
[category] => not_allowed_to_use_this_resource
[message] => Not allowed. Forbidden access to this resource.
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment