diff --git a/app/Web/Controllers/Payments/PayboxController.php b/app/Web/Controllers/Payments/PayboxController.php index 3fa455c..83830df 100644 --- a/app/Web/Controllers/Payments/PayboxController.php +++ b/app/Web/Controllers/Payments/PayboxController.php @@ -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'), );