I?m going to use wx.netword payment apy.
I have create some code that return a json url for open it directly on pc browser for make the payment.
The problem is that the url
when open from the code
open only the forst part of the url
without the amount and other paramethers.
how can i solve this?
php code for generate the final url:
for call it paste on browser this url:
API documentation:
the next step will be save the trxid on mysqbl database..
I have create some code that return a json url for open it directly on pc browser for make the payment.
The problem is that the url
B4X:
https://wx.network/#send/WAVES?recipient=3P6WaYhijLuFRsWFmQBGJmRX1ccJi5BAPcU&amount=0.01&attachment=SomeString&referrer=https://example.com&strict
B4X:
OpenURLInBrowser("https://wx.network/#send/WAVES?recipient=3P6WaYhijLuFRsWFmQBGJmRX1ccJi5BAPcU&amount=0.01&attachment=SomeString&referrer=https://example.com&strict")
B4X:
Sub OpenURLInBrowser(URL As String)
Dim shell As Shell
shell.Initialize("shell", "cmd", Array As String(" /c start " & URL)) ' Modifica "cmd" con il comando del tuo sistema operativo (e.g., "xdg-open" su Linux)
shell.WorkingDirectory = File.DirApp
shell.Run(-1) ' Esegui il comando
End Sub
open only the forst part of the url
B4X:
https://wx.network/#send/WAVES?recipient=3P6WaYhijLuFRsWFmQBGJmRX1ccJi5BAPcU
how can i solve this?
php code for generate the final url:
B4X:
case "creaStakeTrx":
$assetId = "E3V7G5veDsXvg6aJ91kfDV8dXXApTfvhiep1TRK7HmuZ"; // ID del token DUMCOIN
$recipient = "3P6WaYhijLuFRsWFmQBGJmRX1ccJi5BAPcU"; //INDIRIZZO DESTINATARIO
$amount = $_GET["amount"];
$attachment = $_GET["attachment"];
$referrer = "https://test.clickandclaim.me/miefinanze/reffer.php";
// $strict = isset($_GET["strict"]) && $_GET["strict"] === "true";
// Crea l'URL di pagamento
$paymentURL = "https://wx.network/#send/" . urlencode($assetId) . "?recipient=" . urlencode($recipient) . "&amount=" . urlencode($amount);
$paymentURL .= "&attachment=" . urlencode($attachment) . "&referrer=" . urlencode($referrer) . "&strict=true";
// Effettua il pagamento reindirizzando l'utente
// Costruisci un array con l'URL
$responseArray = array("paymentURL" => $paymentURL);
// Invia la risposta JSON contenente l'URL
header("Content-Type: application/json");
echo json_encode($responseArray);
break;
for call it paste on browser this url:
B4X:
https://test.clickandclaim.me/miefinanze/myapi.php?action=creaStakeTrx&amount=50&attachment=Pack1
API documentation:
B4X:
https://docs.wx.network/en/guide/client-api/payment-api
the next step will be save the trxid on mysqbl database..