Skip to content

Commit

Permalink
Diminution des appels à payline
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgu74 committed Nov 18, 2013
1 parent 484572d commit 2c576f7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Payutc/Bom/Payline.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,18 +215,18 @@ public function notification($token, $want_return=False) {
$return_url = "";
}

if($result['pay_step'] != "W") {
// ERROR ! Ce rechargement n'est pas en attente.
// Tentative de double rechargement ?
Log::warn("PAYLINE : Notification sur une transaction qui n'est pas en attente.", array('token' => $token));
return $return_url;
}

$response = $this->payline->getWebPaymentDetails($array);
if(isset($response)){
// Paiement valide
if($response["result"]["code"] == "00000") {
$conn = Dbal::conn();

if($result['pay_step'] != "W") {
// ERROR ! Ce rechargement n'est pas en attente.
// Tentative de double rechargement ?
Log::warn("PAYLINE : Tentative de double rechargement !", array('token' => $token, 'response'=>$response));
return $return_url;
}

$conn->beginTransaction();
try {
Expand Down

0 comments on commit 2c576f7

Please sign in to comment.