New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forwarding typo and NO_RESPONSE_PAGE parameter #2

Merged
merged 2 commits into from Aug 1, 2016
Jump to file or symbol
Failed to load files and symbols.
+10 −11
Diff settings

Always

Just for now

Next

Removed hard coded NO_RESPONSE_PAGE parameter.

  • Loading branch information...
vrobic committed Jul 28, 2016
commit 8574111e2b661a6e678796148210ec286f1cd4d5
@@ -24,16 +24,16 @@
use Symfony\Component\DependencyInjection\ContainerInterface as Container;
/*
* Powered by the WCE Community
/*
* Powered by the WCE Community
* Worst code ever presents... The JRKPaymentSips service !
*/
class JRKPaymentSips {
public $container;
public $datas_request;
public function __construct(Container $container = null) {
@@ -83,7 +83,7 @@ public function get_sips_request($attrbs = array(),$transaction = null, $tag = n
$path_bin = $this->p("jrk_sips_request");
if (empty($path_bin)) {
throw new \Exception('jrk_payment_sips.files.sips_request is not set');
}
@@ -107,9 +107,9 @@ public function get_sips_request($attrbs = array(),$transaction = null, $tag = n
$parm .= $this->defset($attrbs,"language");
$parm .= $this->defset($attrbs,"payment_means");
$parm .= $this->defset($attrbs,"header_flag");
foreach($attrbs as $k => $v){ $parm .= $k."=".$v." "; $this->datas_request[$k] = $v; }
/*
$parm="$parm capture_day="; $parm="$parm capture_mode="; $parm="$parm bgcolor="; $parm="$parm order_id=";
@@ -123,7 +123,6 @@ public function get_sips_request($attrbs = array(),$transaction = null, $tag = n
foreach($user_data as $k => $v) { $parm.=$k."=".$v.";";}
$parm = substr($parm,0,-1);
*/
$parm .="data=NO_RESPONSE_PAGE ";
$parm = escapeshellcmd($parm);
@@ -139,7 +138,7 @@ public function get_sips_request($attrbs = array(),$transaction = null, $tag = n
$this->datas_request["error"] = $tableau[2];
$this->datas_request["render"] = $tableau[3];
$this->datas_request["path_bin"] = $path_bin;
if (( $this->datas_request["code"] == "" ) && ( $this->datas_request["error"] == "" ) ) {
throw new \Exception("call to $path_bin failed");
}
@@ -156,12 +155,12 @@ public function get_sips_request($attrbs = array(),$transaction = null, $tag = n
return $this->datas_request["render"];
}
public function getCurrencySipsCode($currency_iso)
{
if (preg_match('#^([0-9]+)$#',$currency_iso))
if (preg_match('#^([0-9]+)$#',$currency_iso))
return $currency_iso;
$currencies = array(
"EUR" => "978","USD" => "840",'EUR' => '978', 'USD' => '840','CHF' => '756','GBP' => '826',
'CAD' => '124','JPY' => '392', 'MXP' => '484','TRL' => '792','AUD' => '036','NZD' => '554',