fix refabonne

This commit is contained in:
Christophe LATOUR 2017-12-01 17:37:57 +01:00
parent 677db8c913
commit ce0d4a379d

View File

@ -27,8 +27,15 @@ class PayboxController extends ApiBaseController {
//http://www1.paybox.com/espace-integrateur-documentation/les-solutions-paybox-direct-et-paybox-direct-plus/les-operations-de-caisse-direct-plus/
const ACTION_CAPTURE_FROM_SUBSCRIBER = '000053';
private function getRefAbonne() {
return 'latour+bbb@antadis.com';
/**
* Returns the refabonne
*
* @param ApiUser $user the current conntect user
*
* @return string
*/
private function getRefAbonne(ApiUser $user) {
return $user->email;
}
/**
@ -40,7 +47,7 @@ class PayboxController extends ApiBaseController {
return array(
'MONTANT' => strval(ApiTools::convertPrice($cart->getOrderTotal(), null, false) * 100),
'DEVISE' => '978',
'REFABONNE' => $this->getRefAbonne(),
'REFABONNE' => $this->getRefAbonne($request->user()),
'REFERENCE' => (int)$cart->id,
'DATEQ' => date('dmYHis'),
);