diff --git a/src/Payment.php b/src/Payment.php index 9d8ba37..820292c 100644 --- a/src/Payment.php +++ b/src/Payment.php @@ -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, @@ -65,6 +61,7 @@ public function __construct($login, $paymentPassword, $validationPassword, $test 'Encoding' => 'utf-8', 'Culture' => self::CULTURE_RU, 'IncCurrLabel' => '', + 'IsTest' => $testMode ? 1 : 0 ]; } @@ -345,4 +342,16 @@ public function setCurrencyLabel($currLabel) return $this; } + + /** + * @param $email + * @return $this + */ + public function setEmail($email) + { + $this->data['Email'] = $email; + + return $this; + } + }