Introduction
If you are developing a social networking platform or any custom web application using Wowonder PHP Script, one of the most important features you’ll need is a payment gateway integration. Among the most popular payment gateways in India is PayUMoney, a fintech solution that enables businesses to accept and process online payments securely.
In this guide, we’ll walk you through how to integrate PayUMoney into the Wowonder PHP script with complete code examples, setup instructions, and best practices for security. By the end, you’ll have a working PayU payment gateway inside your Wowonder-based application.
What is PayU?
PayU is a fintech business that provides payment technologies to internet merchants. It allows businesses to:
- Accept online payments via credit card, debit card, net banking, and UPI
- Integrate payments into websites and mobile applications
- Process transactions in multiple currencies
👉 External Resource: Official PayU Documentation
How Do I Pay with PayU?
When a customer clicks Confirm booking, they are redirected to the PayU payment page. From there, they can pay using:
- Indian credit cards
- Debit cards
- Net banking
- UPI or wallet options
📌 Important: Currently, in India, PayU processes payments in Indian Rupees (INR).
Is PayUMoney Safe?
There are mixed reviews regarding PayUMoney. While it is a widely used gateway, some merchants have reported issues with settlement delays. Always ensure that you:
- Verify merchant account documents
- Test transactions in sandbox mode first
- Keep transaction logs for disputes
- Use SSL (HTTPS) on your domain
Step-by-Step Integration of PayUMoney with Wowonder PHP Script
Let’s begin the integration process. You’ll need:
- A valid PayUMoney merchant account (test/live)
- Access to your Wowonder PHP script installation
- Basic PHP knowledge
Step 1: Create an index.php File
This file generates a transaction hash and prepares the payment form.
<?php
if(strcasecmp($_SERVER['REQUEST_METHOD'], 'POST') == 0){
/*Request hash*/
$contentType = isset($_SERVER["CONTENT_TYPE"]) ? trim($_SERVER["CONTENT_TYPE"]) : '';
if(strcasecmp($contentType, 'application/json') == 0){
$data = json_decode(file_get_contents('php://input'));
$hash=hash('sha512', $data->key.'|'.$data->txnid.'|'.$data->amount.'|'.$data->pinfo.'|'.$data->fname.'|'.$data->email.'|||||'.$data->udf5.'||||||'.$data->salt);
$json=array();
$json['success'] = $hash;
echo json_encode($json);
}
exit(0);
}
?>
👉 This ensures that your transaction is secure and verified before hitting the PayU server.
Step 2: Payment Form Setup
Inside the same index.php, you’ll create a payment form with required fields like Merchant Key, Salt, Transaction ID, Amount, Product Info, and User Details.
<form action="#" id="payment_form">
<input type="hidden" id="udf5" name="udf5" value="BOLT_KIT_PHP7" />
<input type="hidden" id="surl" name="surl" value="<?php echo getCallbackUrl(); ?>" />
<div><label>Merchant Key:</label><input type="text" id="key" name="key" /></div>
<div><label>Merchant Salt:</label><input type="text" id="salt" name="salt" /></div>
<div><label>Transaction ID:</label><input type="text" id="txnid" name="txnid" value="<?php echo "Txn" . rand(10000,99999999)?>" /></div>
<div><label>Amount:</label><input type="text" id="amount" name="amount" value="6.00" /></div>
<div><label>Product Info:</label><input type="text" id="pinfo" name="pinfo" value="P01,P02" /></div>
<div><label>First Name:</label><input type="text" id="fname" name="fname" /></div>
<div><label>Email ID:</label><input type="text" id="email" name="email" /></div>
<div><label>Mobile:</label><input type="text" id="mobile" name="mobile" /></div>
<div><label>Hash:</label><input type="text" id="hash" name="hash" /></div>
<button type="submit" onclick="launchBOLT(); return false;">Pay</button>
</form>
Step 3: Handle Payment Response (response.php)
After payment, PayU redirects users to response.php. This script verifies the transaction hash and ensures no tampering.
<?php
$postdata = $_POST;
if (isset($postdata ['key'])) {
$status = $postdata['status'];
$resphash = $postdata['hash'];
/*Verify Hash Here*/
if ($status == 'success') {
echo "Transaction Successful and Hash Verified.";
} else {
echo "Payment Failed or Tampered.";
}
}
?>
Is PayU Available in the United States?
Yes Since 2016, PayU has expanded globally. It now supports over 100 currencies, including:
- US Dollar (USD)
- Euro (EUR)
- British Pound (GBP)
- Australian Dollar (AUD)
- Arab Emirates Dirham (AED)
- Singapore Dollar (SGD)
- Bahraini Dinar (BHD)
- New Zealand Dollar (NZD)
👉 Internal Link: Guide to International Payment Gateways in PHP
Best Practices for PayU Integration
- Always use sandbox mode before going live
- Implement hash verification for every transaction
- Store logs for transaction disputes
- Use HTTPS for secure data transfer
- Update scripts regularly to avoid security issues
Internal Links
External Links
Conclusion
Integrating PayUMoney into the Wowonder PHP script is essential if you’re targeting the Indian market. With proper configuration of index.php and response.php, and careful verification of payment hashes, you can ensure that your platform processes payments securely and efficiently.
By following this step-by-step tutorial, your Wowonder-powered website will be ready to handle online transactions seamlessly, making it more professional and trustworthy for users.



