add working non-api example

removed keys
This commit is contained in:
sneurlax 2023-01-18 09:54:33 -06:00
parent b575ee82ed
commit 202ce56448

View file

@ -174,10 +174,15 @@ class SimplexAPI {
void newOrder(SimplexQuote quote) async {
try {
// curl --request POST \
// --url https://sandbox.test-simplexcc.com/wallet/merchant/v2/payments/partner/data \
// --header 'Authorization: ApiKey XXX' \
// --header 'accept: application/json' \
// --header 'content-type: application/json' \
// -d '{"account_details": {"app_provider_id": "pk_test_XXX", "app_version_id": "123", "app_end_user_id": "01e7a0b9-8dfc-4988-a28d-84a34e5f0a63", "signup_login": {"timestamp": "1994-11-05T08:15:30-05:00", "ip": "207.66.86.226"}}, "transaction_details": {"payment_details": {"quote_id": "3b58f4b4-ed6f-447c-b96a-ffe97d7b6803", "payment_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "order_id": "789", "original_http_ref_url": "https://stackwallet.com/simplex", "destination_wallet": {"currency": "BTC", "address": "bc1qjvj9ca8gdsv3g58yrzrk6jycvgnjh9uj35rja2"}}}}'
// TODO launch URL which POSTs headers like https://integrations.simplex.com/docs/new-window-payment-form-submission-1
// Not working example so not helpful
// curl -H "Content-Type: application/json" -d '{"account_details": {"app_end_user_id": "asd"}, "transaction_details": {"digital_currency": "BTC", "fiat_currency": "USD", "requested_currency": "USD", "requested_amount": 101}}' http://sandbox-api.stackwallet.com/order
Map<String, String> headers = {
'Content-Type': 'application/json',
};