Opencart, modifying payment module -
i using barclaycard epdq module (by qphoria) on clients site works q isn't answering emails help (paid might add).
the problem default design payment page poor (barclaycard's end) , able via phone call add together our own payment page.
<input type="hidden" name="tp" value=""> i think have found file need edit add together in have no thought where:
class="lang-php prettyprint-override"><?php /** * @author qphoria@gmail.com * @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; } // key remove form list $passphrase = $params['key']; unset($params['key']); ksort($params); $hash = ''; foreach ($params $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 $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); homecoming $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); } } } ?> anyone able help me out of jam?
just before:
$data .= '<input type="submit" value="-->" />'; add line want to:
$data .= '<input type="hidden" name="tp" value="">'; alternately find function called: buildoutput($params) , add together $params array 'tp' => 'value'
there many other alternatives best possible approach follow route developer has allready set, add-on of parameter in $params array.
opencart
No comments:
Post a Comment