Online payments (Shopping Cart Interface (SCI)) – this is part of the Ezoex.com system, which allows you to make cryptocurrency payments from the Buyer crypto wallets to the Seller’s account. It is used to process payments for products or services offered by the Seller. Both SCI and the Seller’s website use simple HTML forms to transfer the necessary information between SCI and the Seller’s website, which allows the Buyer to make a payment transfer and the Seller to receive and properly process the received payment.
Manage SCI keysIn order to accept payments online, the Seller’s website must redirect the Buyer to SCI Ezoex.com to complete the payment for products or services ordered by him on the Seller’s website. After successful payment, the Buyer will redirected back to the Seller’s website.
The full process of accepting payments through SCI includes the following steps:
You need to redirect the Buyer to the SCI Ezoex.com website (and send a POST payment request form) to the following URL: https://ezoex.com/en/payonline
Payment Request Form - this is an HTML form for payment request, which is generated by the Seller’s website and is used to transmit data to SCI Ezoex.com
The table below lists all the acceptable fields for the HTML form for proper interaction with SCI.
Parameter | Required | Description |
---|---|---|
ShopName |
required | Shop name (ex: My Shop) |
SellerId |
required | Seller's SCI api key. Generated during key creation |
CurrencyId |
required | a string literal (ex: BTC) |
Amount |
required | the amount to purchase (ex: 0.1234) |
ClientId |
required | Order id on the merchant site. Must be unique |
<form action="https://ezoex.com/en/payonline/" method="post">
<input type="hidden" name="SellerId" value="G95ExBbQekauE8Dna4V10w64IfbB17FEqaX">
<input type="hidden" name="CurrencyId" value="ETH">
<input type="hidden" name="Amount" value="0,002">
<input type="hidden" name="ClientId" value="c21186a8-87f4-46df-8eb4-b89ab4d41a91">
</form>
Successful payment form – this is an HTML form that is generated and sent to SCI for reflection on the Successful Payment page of the Seller (Success URL). This form is a set of hidden fields containing information about the executed payment. The table below contains descriptions of the fields.
Note: Please do not use this form for payment processing, it may not be safe. For processing, use the form "Payment Status"
Parameter | Description |
---|---|
ShopName |
Shop name (ex: My Shop) |
CurrencyId |
a string literal (ex: BTC) |
Amount |
The amount paid by the buyer (ex: 0.1234) |
ClientId |
Order id on the merchant site. |
<form action="https://myshop.com/success.html" method="post">
<input type="hidden" name="ShopName" value="My Shop">
<input type="hidden" name="CurrencyId" value="ETH">
<input type="hidden" name="Amount" value="0,002">
<input type="hidden" name="ClientId" value="c21186a8-87f4-46df-8eb4-b89ab4d41a91">
</form>
Payment failed form – this is an HTML form that is sent to SCI to showing on the Seller’s website (Fail URL) in the event of non-payment. This form is a set of hidden fields containing information about the payment that should have been received by the Seller.
Parameter | Description |
---|---|
ShopName |
Shop name (ex: My Shop) |
CurrencyId |
a string literal (ex: BTC) |
Amount |
the ordered amount (ex: 0.1234) |
ClientId |
Order id on the merchant site. |
<form action="https://myshop.com/fail.html" method="post">
<input type="hidden" name="ShopName" value="My Shop">
<input type="hidden" name="CurrencyId" value="ETH">
<input type="hidden" name="Amount" value="0,002">
<input type="hidden" name="ClientId" value="c21186a8-87f4-46df-8eb4-b89ab4d41a91">
</form>
Payment status form – This is an HTML form that is sent by SCI to the Seller’s payment confirmation page or module (Status URL). This form is a set of hidden fields containing information about the executed payment. The table below contains descriptions of the fields.
Note: SCI will send this form after changing the confirmations count of a transaction until the status will not change to "Paid"
Parameter | Description |
---|---|
ShopName |
Shop name (ex: My Shop) |
CurrencyId |
a string literal (ex: BTC) |
Amount |
The amount paid by the buyer (ex: 0.1234) |
ClientId |
Order id on the merchant site. |
TxId |
Transaction ID in blockchain |
Confirmations |
Confirmations count in the blockchain |
Status |
Created, Cancelled, WaitConfirm, Paid |
Sign |
HASH-string, composed of information contained in this form, signed by the secret key in the standard format HMAC-SHA512 for protection |
To generate a digital signature (Sign), you need to combine the following parameters of the Payment Status Form in the following order
//ShopName:CurrencyId:Amount:ClientId:TxId:Status
$shopName=$_POST['ShopName'];
$currencyId=$_POST['CurrencyId'];
$amount=$_POST['Amount'];
$clientId=$_POST['ClientId'];
$sciSign=$_POST['Sign'];
$txId=$_POST['TxId'];
$status=$_POST['Status'];
$apisecret='xxx';
$str=$shopName.':'.$currencyId.':'.$amount.':'.$clientId.':'.$txId.':'.$status;
$sign=hash_hmac('sha512',$str,$apisecret);
if($sign == $sciSign){
//Process payment
}
<form action="https://myshop.com/status.html" method="post">
<input type="hidden" name="ShopName" value="My Shop">
<input type="hidden" name="CurrencyId" value="ETH">
<input type="hidden" name="Amount" value="0,002">
<input type="hidden" name="ClientId" value="c21186a8-87f4-46df-8eb4-b89ab4d41a91">
<input type="hidden" name="Sign" value="3ddbf164e965f996b28a6aea68276cb744a17de8888b64ad5b243336e1b3b28fda78857009042d4a3b1ac77ba6a220cac40211f06c1001db6db467cddaf8afdc">
<input type="hidden" name="TxId" value="0x65dd491b24a67d6a80a7e6ccec1246d28e4caab327d8ea322333ba17144c2c8f">
<input type="hidden" name="Confirmations" value="2">
<input type="hidden" name="Status" value="WaitConfirm">
</form>