-1
완벽하게 작동하는 고객 사이트에서 Barclaycard EPDQ 모듈 (Qphoria 제공)을 사용하고 있습니다. 그러나 Q가이 문제에 도움이되는 전자 메일에 응답하지 않습니다 (추가 할 수도 있음).Opencart, 지불 모듈 수정
결제 페이지의 기본 디자인이 좋지 않습니다 (Barclaycard 님의 문제). 다시 전화를 통해 직접 지불 페이지를 추가 할 수 있습니다. 수
<?php
/**
* @author [email protected]
* @web http://www.opencartguru.com/
*
* @usage
* $params = array(
* 'xxx' => 'value1',
* 'yyy' => 'value2',
* 'zzz' => 'value3',
* );
*
* $payclass = New PayClass();
* $payclass->sendPayment($params);
*/
class barclay_advanced {
private $_url = 'https://payments.epdq.co.uk/ncol/prod/orderstandard.asp';
private $_testurl = 'https://mdepayments.epdq.co.uk/ncol/test/orderstandard.asp';
private $_log = '';
public function __construct($logpath = '') {
if ($logpath && is_dir($logpath) && is_writable($logpath)) { $this->_log = $logpath . basename(__FILE__, '.php') . '.log'; }
}
public function buildOutput($params) {
$url = $this->_url;
if (isset($params['test'])) {
unset($params['test']);
$url = $this->_testurl;
}
// Get the key but remove from the form list
$passphrase = $params['key'];
unset($params['key']);
ksort($params);
$hash = '';
foreach ($params as $k => $v) {
$hash .= $k . '=' . $v . trim($passphrase);
}
$this->writeLog('HASH STRING: ' . $hash);
$sha1hash = strtoupper(sha1($hash));
$params['SHASIGN'] = $sha1hash;
$data = 'Redirecting...';
$data .= '<form action="'.$url.'" id="payform" method="post">';
foreach ($params as $key => $value) {
if ($key == 'OWNERZIP' && !$value) { continue; } // Skip missing zip
$data .= '<input type="hidden" name="'.$key.'" value="'.$value.'" />';
}
$data .= '<input type="submit" value="-->" />';
$data .= '</form>';
$data .= '<script type="text/javascript">';
$data .= 'document.forms["payform"].submit();';
$data .= '</script>';
$this->writeLog($data);
return $data;
}
private function writeLog($msg) {
if ($this->_log) {
$msg = (str_repeat('-', 70) . "\r\n" . $msg . "\r\n" . str_repeat('-', 70) . "\r\n");
file_put_contents($this->_log, $msg, FILE_APPEND);
}
}
}
?>
사람이 잼에서 도와 :
<input type="hidden" name="TP" value="">
나는 내가에서 추가 편집해야하지만, 아무 생각이없는 파일을 발견 한 것 같아?
필자의 허가없이 유료 확장 코드를 공유하는 것이 좋은 생각이라고 생각하지 않습니다. 적어도 필자로서 나는 정말로 화가 났을 것이다. – shadyyx