Skip to content

Commit

Permalink
Fix for Test Payment (#8)
Browse files Browse the repository at this point in the history
* Update Payment.php
  • Loading branch information
gam6itko authored and jhaoda committed Jan 4, 2017
1 parent b702e54 commit 1bb2a1e
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ public function __construct($login, $paymentPassword, $validationPassword, $test
$this->validationPassword = $validationPassword;
$this->isTestMode = $testMode;

if ($this->isTestMode) {
$this->baseUrl = 'http://test.robokassa.ru/Index.aspx?';
}

$this->data = [
'MerchantLogin' => $this->login,
'InvId' => null,
Expand All @@ -65,6 +61,7 @@ public function __construct($login, $paymentPassword, $validationPassword, $test
'Encoding' => 'utf-8',
'Culture' => self::CULTURE_RU,
'IncCurrLabel' => '',
'IsTest' => $testMode ? 1 : 0
];
}

Expand Down Expand Up @@ -345,4 +342,16 @@ public function setCurrencyLabel($currLabel)

return $this;
}

/**
* @param $email
* @return $this
*/
public function setEmail($email)
{
$this->data['Email'] = $email;

return $this;
}

}

0 comments on commit 1bb2a1e

Please sign in to comment.