From 74f783391b844c34d40ad0942f15d25b4674831b Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 25 Jan 2023 11:13:00 -0600 Subject: [PATCH] use _buildUri in redirect --- lib/services/buy/simplex/simplex_api.dart | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/services/buy/simplex/simplex_api.dart b/lib/services/buy/simplex/simplex_api.dart index 10e799c08..1356e88db 100644 --- a/lib/services/buy/simplex/simplex_api.dart +++ b/lib/services/buy/simplex/simplex_api.dart @@ -290,9 +290,17 @@ class SimplexAPI { Future> redirect(SimplexOrder order) async { try { + Map headers = { + 'Content-Type': 'application/x-www-form-urlencoded', + }; + Map data = { + 'ROUTE': 'redirect', + 'PAYMENT_ID': order.paymentId, + }; + Uri url = _buildUri('api.php', data); + bool status = await launchUrl( - Uri.parse( - "https://simplex-sandbox.stackwallet.com/api.php?ROUTE=redirect&PAYMENT_ID=${order.paymentId}"), + url, mode: LaunchMode.externalApplication, );