method __construct documentation in bbn\Api\Paybox
function(array $cfg, $price, $email, $ref, $currency = 'EUR')
{
if ( isset($cfg['site'],$cfg['rang'],$cfg['id'],$cfg['key'],$cfg['pass'])
&& is_numeric($price)
&& $price > 0
&& bbn\Str::isEmail($email)
&& $this->checkServer() )
{
if ( isset(self::$currencies[$currency]) )
{
$this->currency = self::$currencies[$currency];
$this->price = $price * 100;
$this->email = $email;
$this->binkey = pack("H*",$cfg['key']);
$this->ref = $ref;
$this->cfg = $cfg;
$this->enc = self::$encryptions[array_rand(self::$encryptions)];
$this->time = date('c');
$this->params = [
'PBX_SITE' => $this->cfg['site'],
'PBX_RANG' => $this->cfg['rang'],
'PBX_IDENTIFIANT' => $this->cfg['id'],
'PBX_TOTAL' => $this->price,
'PBX_DEVISE' => $this->currency,
'PBX_CMD' => $this->ref,
'PBX_PORTEUR' => $this->email,
'PBX_RETOUR' => 'Total:M;nomSession:R;NumAutorisation:A;NumTransaction:T;TypeCarte:C;Erreur:E',
'PBX_REPONDRE_A' => self::$url_reponse,
'PBX_HASH' => $this->enc,
'PBX_TIME' => $this->time
];
$this->process();
$this->online = 1;
}
}
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions