Accept payments via your website with Walleteze
Basic HTML form for receiving payments via your website
<form action="https://walleteze.com/payment" method="POST">
<input type="hidden" name="vendor" value="vendor@email.com">
<input type="hidden" name="item_number" value="2">
<input type="hidden" name="item_name" value="iPhone 8 PLUS 64GB">
<input type="hidden" name="item_price" value="1100.45">
<input type="hidden" name="item_currency" value="EUR">
<input type="hidden" name="return_success" value="http://yourwebsite.com/success.php">
<input type="hidden" name="return_fail" value="http://yourwebsite.com/failure.php">
<input type="hidden" name="return_cancel" value="http://yourwebsite.com/cancel.php">
<button type="submit">Pay via Walleteze</button>
</form>
String | Value | Description |
---|---|---|
vendor | e.g.: vendor@email.com | This field is required to verify your account and to transfer payment direct to your wallet. Enter the email address you have registered with this website. |
item_number | e.g.: 2 | Use this field to specify an order number, a product number, or any useful reference that can be returned to your site upon successful payment to confirm the transaction. |
item_name | e.g.: iPhone 8 PLUS 64GB | This will be displayed on our payment page so clients can see what they are paying for. |
item_price | e.g.: 1100.45 | Enter a valid order amount. |
item_currency | e.g.: EUR/GBP/USD | Enter the 3-letter abbreviation for the required currency. |
return_success | e.g.: http://yourwebsite.com/success.php | Enter the URL to use for IPN verification (PHP example code is below) and successful payment messages. |
return_fail | e.g.: http://yourwebsite.com/failure.php | Enter the URL to use for failed payment messages. |
return_cancel | e.g.: http://yourwebsite.com/cancel.php | Enter the URL to use for cancelled payment messages. |
IPN verification code for all payment outcomes.
<?php
$vendor_key = '...'; // Enter your vendor API key here
$vendor = @$_POST['vendor']; // Your email address
$payee = @$_POST['payee']; // Email address of the payee
$tx_id = @$_POST['tx_id']; // Transaction ID
$item_number = @$_POST['item_number'];
$item_name = @$_POST['item_name'];
$item_price = @$_POST['item_price'];
$item_currency = @$_POST['item_currency'];
$fee_amount = @$_POST['fee_amount']; // Transaction fee
$net_amount = @$_POST['net_amount']; // Amount you receive
$payment_time = @$_POST['payment_time']; // Time payment was attempted
$verification_link = "https://walleteze.com/ipn.php?vendor_key={$vendor_key}&vendor={$vendor}&tx_id={$tx_id}";
if (!empty($vendor) && !empty($tx_id)) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $verification_link);
$results = curl_exec($ch);
$results = json_decode($results);
curl_close($ch);
}
if (@$results->status == 'success') {
echo $results->msg;
// Run your `success` code here
}
else if (isset($results->status)) {
echo "Payment {$results->status}<br/>Reason: {$results->msg}";
// Run your `failure` code here
}
else {
echo 'Unknown error';
// Run your `error` code here
}
?>
An integration testing facility
When integrating the Walleteze IPN system into your website, the ability to make test purchases (without requiring real funds on account) is extremely useful.
<form action="https://walleteze.com/sandbox/payment" method="POST">
- and -
$verification_link = "https://walleteze.com/sandbox/ipn.php?vendor_key={$vendor_key}&vendor={$vendor}&tx_id={$tx_id}";