在resellerclub中发送交易成功验证

时间:2015-07-19 09:55:06

标签: php transactions confirmation

Resellerclub定制支付网关集成: http://manage.uk.resellerclub.com/kb/servlet/KBServlet/faq411.html 我需要向resellerclub发送交易成功消息,以便将购买的产品分配给客户。 delivery.php提供交易状态。

我的postpayment.php

end

付款显示仍然是authstarted,我需要手动批准付款。任何解决方案??

结帐时页面postpayment.php不会直接显示。我试着添加

<?php
session_start();
///session_save_path("./");
require("functions.php");
require ("delivery.php");   
?>



<html>
<head><title>Post Payment</title></head>
<body bgcolor="white">
<font size=4>
<?php
$key = "AfKdTauRYnPQUFztasCNkr9yCLCfeQhd";


$transId = $_REQUEST['pid'];
$rid = $_REQUEST['rid'];

# Display/execute steps according to status.
echo "Transaction ID: " . $pid . "<br>";
echo "Gateway ID: " . $rid . "<br>";
echo "Transaction Status: " . $_SESSION['TRANSACTION_STATUS'] . "<br>";
echo "Redirect URL: ". $_SESSION['redirecturl'] . "<br><br>";

# Check transaction status value
if($_SESSION['TRANSACTION_STATUS'] == "SUCCESS")
$status = "Y";
else
$status = "N";


srand((double)microtime()*1000000);
$rkey = rand();

$redirectUrl = $_SESSION['redirecturl']; 
$sellingCurrencyAmount = $_SESSION['sellingcurrencyamount'];
$accountingCurrencyAmount = $_SESSION['accountingcurencyamount'];   

 $checksum      =generateChecksum($transId,$sellingCurrencyAmount,$accountingCurrencyAmount,$status, $rkey,$key);   

echo "<a href=" . $redirectUrl . "?" . "transid=" . $transId . "&status=" .      $status . "&rkey=" . $rkey . "&checksum=" . $checksum . "&sellingamount=" . $sellingCurrencyAmount . "&accountingamount=" . $accountingCurrencyAmount . ">"  . "</a>";

$rURL = $redirectUrl . "?" . "transid=" . $transId . "&status=" . $status .  "&rkey=" . $rkey . "&checksum=" . $checksum . "&sellingamount=" . $sellingCurrencyAmount . "&accountingamount=" . $accountingCurrencyAmount;

echo "<br><br>";
?>
Redirecting....
<form name="f1" method="post" action="<?php echo $redirectUrl;?>">   
<input type="hidden" name="transid" value="<?php echo $transId;?>">
<input type="hidden" name="status" value="<?php echo $status;?>">
<input type="hidden" name="rkey" value="<?php echo $rkey;?>">
<input type="hidden" name="checksum" value="<?php echo $checksum;?>">
<input type="hidden" name="sellingamount" value="<?php echo  $sellingCurrencyAmount;?>">
<input type="hidden" name="accountingamount" value="<?php echo     $accountingCurrencyAmount;?>">

<input type="submit" value="Click here to Continue"><BR>
</form>



<script>
window.location = "<?php echo $rURL; ?>";
</script>

这是在页面加载时自动提交表单。仍然没有工作..

0 个答案:

没有答案