⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 authorizenet-sim.php

📁 日程 BosDates v4.5 Copyright ?2004-2005 BosDev
💻 PHP
字号:
<?//////////////////////////// COPYRIGHT NOTICE ////////////////////////////////////// This script is part of BosClassifieds, a software application by BosDev, Inc //// Use of any kind of part or all of this script or modification of this        //// script requires a license from BosDev, Inc. Use or modification of           //// this script without a license constitutes Software Piracy and will           //// result in legal action from BosDev, Inc.  All rights reserved.               ////            http://www.bosdev.com      sales@bosdev.com                       ////                                                                              ////           BosClassifieds Copyright 2004, BosDev, Inc.                        ////////////////////////////////////////////////////////////////////////////////////function paymentForm($adArray,$fee) {	global $SystemOptions,$Languages,$insUrl;	srand(time());	$sequence = rand(1, 1000);	$loginid = $SystemOptions['payment_info_1'];	$txnkey = $SystemOptions['payment_info_2'];	$ret = InsertFP ($loginid, $txnkey, $fee, $sequence,$Languages['currency']['code']);	$form = <<<ENDFORM             <form action="https://secure.authorize.net/gateway/transact.dll" method="post">             $ret	      <input type="hidden" name="x_description" value="{$Languages['payment']['paymenttitle']} {$insUrl}">	      <input type="hidden" name="x_login" value="$loginid">	      <input type="hidden" name="x_amount" value="$fee">              <input type="hidden" name="x_show_form" value="PAYMENT_FORM">              <input type="hidden" name="x_relay_response" value="TRUE">              <input type="hidden" name="x_currency_code" value="{$Languages['currency']['code']}">              <input type="hidden" name="x_relay_url" value="{$insUrl}payment.php?ad=$adArray">              <div align="center"><input type="submit" value="{$Languages['payment']['sendpayment']}"></div>              </form>ENDFORM;	return $form;	}function getPaymentResult($vars) {	$amount = $vars['x_amount'];	$response = $vars['x_response_code'];	$reason_code = $vars['x_response_reason_code'];	$reason_text = $vars['x_response_reason_text'];	$status = array();	if($response == 1) {		$status[1] = 1;		}		else {			$status[1] = 0;			$status[2] = $reason_text;			}	return $status;	}function hmac ($key, $data) {	return (bin2hex (mhash(MHASH_MD5, $data, $key)));	}function InsertFP ($loginid, $txnkey, $amount, $sequence, $currency = "") {	$tstamp = time ();	$fingerprint = hmac ($txnkey, $loginid . "^" . $sequence . "^" . $tstamp . "^" . $amount . "^" . $currency);	$ret = "<input type=\"hidden\" name=\"x_fp_sequence\" value=\"$sequence\">";	$ret .= "<input type=\"hidden\" name=\"x_fp_timestamp\" value=\"$tstamp\">";	$ret .= "<input type=\"hidden\" name=\"x_fp_hash\" value=\"$fingerprint\">";	return $ret;	}?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -