zencart的新支付模块在支付网关确认后显示白屏

时间:2013-08-29 11:19:56

标签: php api payment-gateway zen-cart

请帮助我

在我的zen购物车网站

中的支付网关(新支付网关)确认后,我正在显示白屏

My Before流程代码是来自API的响应,请帮助我

我对Gateway的回复是http://localhost/payzippy_response.php?transaction_currency=INR&transaction_time=2013-08-29+16%3A28%3A42&transaction_response_code=SUCCESS&merchant_key_id=payment&bank_name=NULL&hash=19906f6d691936387368d50b9d82970d&transaction_type=SALE&transaction_response_message=The+transaction+is+successful&version=Cv1&udf2=&udf1=&transaction_status=SUCCESS&payzippy_transaction_id=PZT13082916284265345&hash_method=MD5&merchant_transaction_id=1-20130829105840&udf5=&fraud_action=review&udf4=&transaction_amount=70500&is_international=false&udf3=&fraud_details=[Suspected+txn+by+extended+international+check]&merchant_id=test_t190&payment_method=CREDIT

我的Php代码是

function before_process()
 {
global $messageStack;
$merchantId = $_POST['merchant_id'];
$merchant_key_id = $_POST['merchant_key_id'];
$merchant_transaction_id = $_POST['merchant_transaction_id'];
$payzippy_transaction_id = $_POST['payzippy_transaction_id'];
$transaction_status = $_POST['transaction_status'];
$transaction_response_code = $_POST['transaction_response_code'];
$transaction_response_message = $_POST['transaction_response_message'];
$payment_method = $_POST['payment_method'];
$bank_name = $_POST['bank_name'];
$emi_months = $_POST['emi_months'];
$transaction_amount = $_POST['transaction_amount'];
$transaction_currency = $_POST['transaction_currency'];
$transaction_time = $_POST['transaction_time'];
$fraud_action = $_POST['fraud_action'];
$fraud_details = $_POST['fraud_details'];
$is_international = $_POST['is_international'];
$version = $_POST['version'];
$udf1 = $_POST['udf1'];
$udf2 = $_POST['merchant_id'];
$udf3 = $_POST['udf3'];
$udf4 = $_POST['udf4'];
$udf5 = $_POST['udf5'];
$hash_method = $_POST['hash_method'];       $recievedhash=$_POST['hash'];
    $securitykey=MODULE_PAYMENT_PAYZIPPY_KEY;
   $AuthDesc=$_POST['transaction_status'];   

  $Workingstring="$bank_name|$emi_months|$fraud_action|$fraud_details|$hash|$hash_method|$is_international|$merchant_key_id|$merchant_transaction_id|$MerchantId|$payment_method|$payzippy_transaction_id|$transaction_amount|$transaction_currency|$transaction_response_code|$transaction_response_message|$transaction_status|$transaction_time|$udf1|$udf2|$udf3|$udf4|$udf5|$version|$securitykey";   $Checksum=md5($Workingstring);


    if ($recievedhash == $Checksum)
     $Checksum = 'true';
    else
    $Checksum = 'false';
   if ($Checksum != 'true') {
     $messageStack->add_session('checkout_payment',    MODULE_PAYMENT_PAYZIPPY_ALERT_ERROR_MESSAGE, 'error');
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
}
if ($Checksum == 'true' && $AuthDesc == 'FAILED') {
  $messageStack->add_session('checkout_payment', MODULE_PAYMENT_PAYZIPPY_TEXT_ERROR_MESSAGE, 'error');
  zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));    }  }  

0 个答案:

没有答案