diff --git a/examples/get_orderID.php b/examples/get_orderID.php index d90471f..2224594 100644 --- a/examples/get_orderID.php +++ b/examples/get_orderID.php @@ -5,9 +5,9 @@ use BTCPayServer\Client\Invoice; function verifyOrderId($orderId) { - $apiKey = getenv('API_KEY'); //place your information here - $host = getenv('HOST'); - $storeId = getenv('STORE_ID'); + $apiKey = ''; //place your information here + $host = ''; + $storeId = ''; try { $client = new Invoice($host, $apiKey); @@ -20,18 +20,5 @@ function verifyOrderId($orderId) { } } ?> -// Filter and retain essential information. it uses the POST method, when sending a form for example -/* if (isset($_POST['order_id'])) { - $orderId = filter_var($_POST['order_id'], FILTER_SANITIZE_STRING); - $isValid = verifyOrderId($orderId); - if ($isValid) { - // Extraction des informations de paiement - $price = $isValid['amount']; - $currency = $isValid['currency']; - $buyerEmail = filter_var($isValid['metadata']['buyer_email'], FILTER_SANITIZE_EMAIL); - $buyerUsername = filter_var($isValid['metadata']['buyer_username'], FILTER_SANITIZE_STRING); - $paymentId = $isValid['id']; - $invoiceTime = $isValid['createdTime']; - $name = $isValid['metadata']['itemCode'];}} */