mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
use _buildUri in redirect
This commit is contained in:
parent
a223f735a2
commit
74f783391b
1 changed files with 10 additions and 2 deletions
|
@ -290,9 +290,17 @@ class SimplexAPI {
|
|||
|
||||
Future<BuyResponse<bool>> redirect(SimplexOrder order) async {
|
||||
try {
|
||||
Map<String, String> headers = {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
Map<String, String> 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,
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue