Skip to content

Commit

Permalink
Added MERCHANT_RESPONSE_URL option from configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
eusonlito committed Oct 21, 2016
1 parent e1348ca commit d0a0375
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
'MERCHANT_ID' => 'XXXXXXXXXX',
'ACCOUNT' => 'XXXXXXXXX',
'KEY' => 'XXXXXXXXXXXX',
'MERCHANT_RESPONSE_URL' => 'XXXXXXXXXXXX',
'CURRENCY' => 'EUR',
'AUTO_SETTLE_FLAG' => '1'
);
6 changes: 4 additions & 2 deletions src/Elavon/Tpv/Tpv.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Tpv
*
* @var array
*/
private $configInputs = array('MERCHANT_ID', 'ACCOUNT', 'CURRENCY', 'AUTO_SETTLE_FLAG');
private $configInputs = array('MERCHANT_ID', 'ACCOUNT', 'CURRENCY', 'MERCHANT_RESPONSE_URL', 'AUTO_SETTLE_FLAG');

/**
* Variables de pedido obligatorias
Expand Down Expand Up @@ -196,7 +196,9 @@ private function getOrder(array $order)
$this->checkRequired($order, $this->orderRequired);

foreach ($this->configInputs as $name) {
$order[$name] = $this->config[$name];
if (isset($this->config[$name])) {
$order[$name] = $this->config[$name];
}
}

$order['TIMESTAMP'] = date('YmdHis');
Expand Down

0 comments on commit d0a0375

Please sign in to comment.