Jump to content

goldeniws

Retired Forum Member
  • Posts

    2
  • Joined

  • Last visited

1 Follower

About goldeniws

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

goldeniws's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. how set $decimals = 3; for example price 10.750 TND
  2. can you help me i want maker my personel payment Config form to get paid <form action="http://test.pro/payment" method="POST"><input type="hidden" name="merchant_account" value="merchant@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"><input type="hidden" name="item_currency" value="USD"><input type="hidden" name="return_success" value="http://yourwebsite.com/success.php"><input type="hidden" name="return_fail" value="http://yourwebsite.com/fail.php"><input type="hidden" name="return_cancel" value="http://yourwebsite.com/cancel.php"><button type="submit">Pay</button></form> Payment Verification (success.php) <?php$merchant_key = 'M63C0-5CC62-06EFB-505A3-11209'; // Enter here your merchant API Key$merchant_account = $_POST['merchant_account'];$item_number = $_POST['item_number'];$item_name = $_POST['item_name'];$item_price = $_POST['item_price'];$item_currency = $_POST['item_currency'];$txid = $_POST['txid']; // Transaction ID$payment_time = $_POST['payment_time']; // Current time of payment$payee_account = $_POST['payee_account']; // The account of payee$verification_link = "http://test.pro/payment_status.php?merchant_key=$merchant_key&merchant_account=$merchant_account&txid=$txid";$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);curl_close($ch);$results = json_decode($results);if($results->status == "success") { //Payment is successful //Run your php code here echo 'Payment is successful.';} else { echo 'Payment was failed.';}?> this Integration Guide how config with this Merchant Gateway Module https://github.com/WHMCS/sample-merchant-gateway
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated