mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 20:09:23 +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 {
|
Future<BuyResponse<bool>> redirect(SimplexOrder order) async {
|
||||||
try {
|
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(
|
bool status = await launchUrl(
|
||||||
Uri.parse(
|
url,
|
||||||
"https://simplex-sandbox.stackwallet.com/api.php?ROUTE=redirect&PAYMENT_ID=${order.paymentId}"),
|
|
||||||
mode: LaunchMode.externalApplication,
|
mode: LaunchMode.externalApplication,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue