
ABC Crypto Checkout Payerurl woocommerce plugin
ABC Crypto checkout plugin is powered by Payerurl. For online payments, The ABC plugin converts any Fiat currency to crypto coin with a live exchange rate to pay the user online. With the ABC Crypto Checkout feature, you can also accept payments via Binance QR codes and receive crypto payments through the Binance personal account . Once payment is complete; money instantly credits to the merchant’s account and also provides a response to the merchant store/website payment information through API for the change Order status to “processing”
Plugin URL: ABC Crypto Checkout – WordPress plugin | WordPress.org


]]>

# Send payment request:
<!DOCTYPE html>
<html>
<head>
<title>Javascript integration</title>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js”> </script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js”> </script>
</head>
<body>
<h1>Loading….</h1>
</body>
<script>
let invoiceid = 12345;
let amount = 123;
let currency = ‘usd’;
let billing_fname = ‘First name’;
let billing_lname = ‘Last name’;
let billing_email = ‘[email protected]’;
let redirect_to = ‘https://www.test.com/checkout/order-pay/1234/?key=wc_order_nBSBH9A6wuFnk’;
let notify_url = ‘https://www.test.com/wc-api/wc_payerurl’;
/**********Do not share the credentials*********/
// get your API key : https://dashboard.payerurl.com/profile/api-management
let payerurl_secret_key = ‘bd8d7cd729—demo—6ce19d78076’;
let payerurl_public_key = ‘b14cfda7—demo—57568f24a2bd’;
/***********************************************/
let args = {
order_id: invoiceid,
// [required field] [String] [Merchant order ID/ Invoice ID]
amount: amount,
// [required field] [String] [Price of the product]
currency: currency ? currency.toLowerCase() : ‘usd’,
// [required field] [String] [Currency of the price of the product]
billing_fname: billing_fname ? billing_fname : ‘undefined’,
// [Optional field] [String] [Customer billing first name]
billing_lname: billing_lname ? billing_lname : ‘undefined’,
// [Optional field] [String] [Customer billing last name]
billing_email: billing_email ? billing_email : ‘undefined’,
// [Optional field] [String] [Customer billing email]
redirect_to: redirect_to,
// [required field] [String] [After making a purchase, go back to the merchant’s website endpoint]
notify_url: notify_url,
// [required field] [String] [After making a purchase, send notification with payment details]
type: ‘purl’,
// [required field] [String] [The way of the customer request]
};
let keys = Object.keys(args).sort();
let sorted_args = {};
for (let i = 0; i < keys.length; i++) {
sorted_args[keys[i]] = args[keys[i]];
}
let query = new URLSearchParams(sorted_args).toString();
let signature = CryptoJS.HmacSHA256(query, payerurl_secret_key);
//[required field] [Merchant secret key]
let authStr = btoa(payerurl_public_key + ‘:’ + signature);
//[required field] [Merchant public key]
//var_dump($authStr);
let xhr = new XMLHttpRequest();
xhr.open(‘POST’, ‘https://dashboard.payerurl.com/api/payment’, true);
xhr.setRequestHeader(‘Content-Type’, ‘application/x-www-form-urlencoded;charset=UTF-8’);
xhr.setRequestHeader(‘Authorization’, ‘Bearer ‘ + authStr);
xhr.onload = function() {
if (xhr.readyState === xhr.DONE && xhr.status === 200) {
let response = JSON.parse(xhr.responseText);
if (response.redirectTO) {
window.location.replace(response.redirectTO);
}
}
};
xhr.send(query);
</script>
</html>
<?php // Unique Order ID $invoiceid = floor(microtime(true) * 1000); // Order Total Amount and Currency $amount = 123; $currency = 'usd'; // Billing User Info $billing_fname = 'First name'; $billing_lname = 'Last name'; $billing_email = '[email protected]'; // Redirection URLs after payment $redirect_to = 'http://localhost/pt/payerurl_payment_success.php'; $notify_url = 'https://mydomain.com/payerurl_payment_response.php'; $cancel_url = 'http://localhost/pt/payerurl_payment_cancel.php'; // Payerurl API Credentials $payerurl_public_key = 'de1e85e8a087fed83e4a3ba9dfe36f08'; $payerurl_secret_key = '0a634fc47368f55f1f54e472283b3acd'; // Order Items $items = [ [ 'name' => 'Order item name', 'qty' => 'Order item quantity', 'price' => '123', ] ]; // API Parameters $args = [ 'order_id' => $invoiceid, 'amount' => $amount, 'items' => $items, 'currency' => $currency, 'billing_fname' => $billing_fname, 'billing_lname' => $billing_lname, 'billing_email' => $billing_email, 'redirect_to' => $redirect_to, 'notify_url' => $notify_url, 'cancel_url' => $cancel_url, 'type' => 'php', ]; // Generate Signature ksort($args); $args = http_build_query($args); $signature = hash_hmac('sha256', $args, $payerurl_secret_key); $authStr = base64_encode(sprintf('%s:%s', $payerurl_public_key, $signature)); // Send Payment Request to API $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api-v2.payerurl.com/api/payment'); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $args); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type:application/x-www-form-urlencoded;charset=UTF-8', 'Authorization:' . sprintf('Bearer %s', $authStr), ]); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $response = json_decode($response); // Redirect user to the payment page if ($httpCode === 200 && isset($response->redirectTO) && !empty($response->redirectTO)) { header('Location: ' . $response->redirectTO); } exit(); ?> </div>
</pre>
<?php
// Payerurl API Credentials
$payerurl_public_key = 'de1e85e8a087fed83e4a3ba9dfe36f08';
$payerurl_secret_key = '0a634fc47368f55f1f54e472283b3acd';
// Retrieve and Validate Authorization
$headers = getallheaders();
$authStr_post = base64_decode($_POST['authStr'] ?? '');
$auth = $authStr_post ? explode(':', $authStr_post) : [];
if ($payerurl_public_key != $auth[0]) {
echo json_encode(['status' => 2030, 'message' => 'Public key doesn\'t match']);
exit();
}
// Retrieve and Validate Transaction Data
$GETDATA = [
'order_id' => $_POST['order_id'],
'transaction_id' => $_POST['transaction_id'],
'status_code' => $_POST['status_code'],
];
// Perform Additional Security Checks (Optional)
// ksort($GETDATA);
// $signature = hash_hmac('sha256', http_build_query($GETDATA), $payerurl_secret_key);
// if (!hash_equals($signature, $auth[1])) {
// echo json_encode(['status' => 2030, 'message' => 'Signature not matched']);
// exit();
// }
// Respond Based on Payment Status
if ($GETDATA['status_code'] == 200) {
// Order successful
echo json_encode(['status' => 200, 'message' => "Payment successful"]);
} elseif ($GETDATA['status_code'] == 20000) {
// Order cancelled
echo json_encode(['status' => 20000, 'message' => "Order cancelled"]);
} else {
// Payment not completed
echo json_encode(['status' => 2050, 'message' => "Order not complete"]);
}
?>
<pre>
</pre> <?php echo "PAYMENT SUCCESS"; ?> <pre>
</pre> <?php echo "PAYMENT CANCEL"; ?> <pre>
GITHUB repository: https://github.com/muhitmonsur/payerurl_api_integration_by_php
An API key or application programming interface key is a code that gets passed in by computer applications. The program or application then calls the API or application programming interface to identify its user, developer or calling program to a website. API keys are the credentials used to connect user’s payments account to any external systems you’re using to accept payments from. These keys can be found on the payment gateway’s dashboard. Payment gateway APIs allows user to maintain control of the user experience.
If user use Payerurl, they will have the facilities of API keys which help user’s business to interact with customers in more than one place. API will increase the number of places users can interact with their customers exponentially. Imagine the possibilities for contextual payments, way beyond simple web checkout!
User’s business will have real-time purchasing data to inform smarter marketing decisions. Forget about once-a-month check-ins to decipher your transaction patterns. Payerurl with API provides a ton of data beyond simple payment information and the real-time data feeds can be used immediately to help any user understand and act on buyer behaviors. Easy access to this actionable data is key to driving anyone’s business forward. Since Payerurl has the API key facility, it can offer users many methods of payments and they are free to choose their desired ones. .Ideally, user should be able to accept any number of payment types, including all types of credit cards, alternative payment options and international currencies and payment methods. It’s possible with the right API. Our customers will have all the advantages of the flexibility and sales won’t be limited by geographical area or specific payment types.
Last but not the least which is customer’s safety. Our customer data remains safe and secure and API keys will remain only in between user and clients. Payerurl’s APIs are sophisticated enough that user can build their own purchasing experience and take it all the way out to the edge of the payment process—while the API provider remains responsible for PCI data by securing the sensitive credit card fields. The API customer choose will give them the flexibility to handle all types of transactions (mobile, mobile apps, eCommerce, and others) while still providing the security.
What we will provide to you…..
The company offers personalized support in multiple languages so that anyone can seek help. However, you can also reach out to support agents through email at [email protected].
]]>https://github.com/muhitmonsur/Dhru-USDT-Payment-Gateway.git
Contact us to our support team for free setup-
telegram support: https://t.me/Payerurl
[Best_Wordpress_Gallery id=”7″ gal_title=”All galleries”]
]]>