Skip to content

Commit

Permalink
update syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
RTLer committed Jul 1, 2015
1 parent 01af276 commit 25b250d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/Zarinpal.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ public function request($callbackURL, $Amount, $Description, $Email = false, $Mo
'Amount' => $Amount,
'Description' => $Description,
];
if ($Email) $inputs['Email'] = $Email;
if ($Mobile) $inputs['Mobile'] = $Mobile;
$auth = $this->driver->requestDriver($inputs);
$this->Authority = $auth['Authority'];
if ($Email) {
$inputs['Email'] = $Email;
}
if ($Mobile) {
$inputs['Mobile'] = $Mobile;
}
$auth = $this->driver->requestDriver($inputs);
$this->Authority = $auth['Authority'];
return $this->driver->requestDriver($inputs);
}

Expand All @@ -63,7 +67,8 @@ public function verify($status, $amount, $authority)
}
}

public function redirect(){
public function redirect()
{
Header('Location: https://www.zarinpal.com/pg/StartPay/' . $this->Authority);
die;
}
Expand Down

0 comments on commit 25b250d

Please sign in to comment.