Skip to content

Commit

Permalink
payline: Ajout du mail du client (pour le ticket)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgu74 committed Jun 13, 2013
1 parent 678eb63 commit 323a942
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Payutc/Bom/Payline.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function __construct($app_id, $service) {
$this->$service = $service;
}

public function doWebPayment($usr_id, $amount, $returnURL, $cancelURL=null) {
public function doWebPayment($usr, $amount, $returnURL, $cancelURL=null) {
$this->payline->returnURL = $returnURL;
if($cancelURL) {
$this->payline->cancelURL = $cancelURL;
Expand All @@ -93,7 +93,7 @@ public function doWebPayment($usr_id, $amount, $returnURL, $cancelURL=null) {
$conn = Db::getConnection();
$conn->insert('t_paybox_pay',
array(
"usr_id" => $usr_id,
"usr_id" => $usr->getId(),
"pay_step" => "W", // Etat de la transaction (W: Wait, V: Valide, A: Annule/Aborted)
"pay_amount" => $amount,
"pay_date_create" => new \DateTime(),
Expand All @@ -116,6 +116,9 @@ public function doWebPayment($usr_id, $amount, $returnURL, $cancelURL=null) {
$array['order']['amount'] = $amount;
$array['order']['currency'] = PAYMENT_CURRENCY;

// BUYER INFO
$array['buyer']['email'] = $usr->getMail();

// CONTRACT NUMBERS
$array['payment']['contractNumber'] = CONTRACT_NUMBER;
$contracts = explode(";",CONTRACT_NUMBER_LIST);
Expand Down
2 changes: 1 addition & 1 deletion src/Payutc/Service/MADMIN.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public function reload($amount, $callbackUrl) {
return "<error>".$this->getErrorDetail($auth)."</error>";

$pl = new \Payutc\Bom\Payline(-1 , "MADMIN");
return $pl->doWebPayment($this->User->getId(), $amount, $callbackUrl);
return $pl->doWebPayment($this->User, $amount, $callbackUrl);
}

/**
Expand Down

0 comments on commit 323a942

Please sign in to comment.