Skip to content

Commit

Permalink
php-cs-fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Oct 23, 2015
1 parent 5bd56b7 commit ad4dd3b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ OKPAY plugin for PHP merchant library
@link https://github.com/hiqdev/php-merchant-okpay
@package php-merchant-okpay
@license BSD-3-Clause
@copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/)
@copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/)
EOF;

Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);
Expand Down
25 changes: 13 additions & 12 deletions src/Merchant.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @link https://github.com/hiqdev/php-merchant-okpay
* @package php-merchant-okpay
* @license BSD-3-Clause
* @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/)
* @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\php\merchant\okpay;
Expand Down Expand Up @@ -38,23 +38,24 @@ public function getInputs()

public function validateConfirmation($data)
{
if ($this->purse!=$data['ok_receiver']) {
if ($this->purse !== $data['ok_receiver']) {
return 'Wrong receiver';
}
if ($data['ok_txn_status']!='completed') {
if ($data['ok_txn_status'] !== 'completed') {
return "Not completed: $data[ok_txn_status]";
}
$data['ok_verify'] = 'true';
$result = static::curl($this->checkUrl, $data);
if ($result!='VERIFIED') {
$result = static::curl($this->checkUrl, $data);
if ($result !== 'VERIFIED') {
return error("Not VERIFIED: $result");
}
$this->mset(array(
'from' => trim($data['ok_payer_first_name'].' '.$data['ok_payer_last_name']).'/'.$data['ok_payer_email'],
'txn' => $data['ok_txn_id'],
'sum' => $data['ok_txn_gross'],
'time' => $this->formatDatetime($data['ok_txn_datetime']),
));
return null;
$this->mset([
'from' => trim($data['ok_payer_first_name'] . ' ' . $data['ok_payer_last_name']) . '/' . $data['ok_payer_email'],
'txn' => $data['ok_txn_id'],
'sum' => $data['ok_txn_gross'],
'time' => $this->formatDatetime($data['ok_txn_datetime']),
]);

return;
}
}

0 comments on commit ad4dd3b

Please sign in to comment.