  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: payment.php 503 2006-04-19 00:19:25Z hpdl $ |
| |
| 3 | + | $Id: payment.php 523 2006-04-25 14:36:09Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
58 | 58 | | } |
| |
59 | 59 | | |
| |
60 | 60 | | // class methods |
  |
61 | | - | function sendTransactionToGateway($url, $parameters, $header='', $method='post') { |
| |
| 61 | + | function sendTransactionToGateway($url, $parameters, $header = '', $method = 'post', $certificate = '') { |
|
62 | 62 | | if (empty($header) || (is_array($header) === false)) { |
| |
63 | 63 | | $header = array(); |
| |
64 | 64 | | } |
| |
|
|
 |
… |
|
87 | 87 | | curl_setopt($curl, CURLOPT_HTTPHEADER, $header); |
| |
88 | 88 | | } |
| |
89 | 89 | | |
  |
| 90 | + | if (empty($certificate) === false) { |
| |
| 91 | + | curl_setopt($curl, CURLOPT_SSLCERT, $certificate); |
| |
| 92 | + | } |
| |
| 93 | + | |
|
90 | 94 | | curl_setopt($curl, CURLOPT_HEADER, 0); |
| |
91 | 95 | | curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); |
| |
92 | 96 | | curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); |
| |
|
|
 |
… |
|
246 | 250 | | } |
| |
247 | 251 | | } |
| |
248 | 252 | | |
  |
249 | | - | function before_process() { |
| |
| 253 | + | function process() { |
|
250 | 254 | | if (is_array($this->_modules)) { |
| |
251 | 255 | | if (is_object($GLOBALS[$this->selected_module]) && $GLOBALS[$this->selected_module]->isEnabled()) { |
  |
252 | | - | return $GLOBALS[$this->selected_module]->before_process(); |
| |
| 256 | + | return $GLOBALS[$this->selected_module]->process(); |
|
253 | 257 | | } |
| |
254 | 258 | | } |
| |
255 | 259 | | } |
| |
256 | 260 | | |
  |
257 | | - | function after_process() { |
| |
258 | | - | if (is_array($this->_modules)) { |
| |
259 | | - | if (is_object($GLOBALS[$this->selected_module]) && $GLOBALS[$this->selected_module]->isEnabled()) { |
| |
260 | | - | return $GLOBALS[$this->selected_module]->after_process(); |
| |
261 | | - | } |
| |
262 | | - | } |
| |
263 | | - | } |
| |
264 | | - | |
  |
265 | 261 | | function get_error() { |
| |
266 | 262 | | if (is_array($this->_modules)) { |
| |
267 | 263 | | if (is_object($GLOBALS[$this->selected_module]) && $GLOBALS[$this->selected_module]->isEnabled()) { |