yandex-money-kassa-example
yandex-money-kassa-example copied to clipboard
коды ответа в xml
https://github.com/yandex-money/yandex-money-kassa-example/blob/master/src/YaMoneyCommonHttpProtocol.php
if ($request['orderSumAmount'] < 100) {
$response = $this->buildResponse($this->action, $request['invoiceId'], 100, "The amount should be more than 100 rubles.");
} else {
$response = $this->buildResponse($this->action, $request['invoiceId'], 0);
}
Почему бы не вынести коды ответа в константы класса? А то здесь еще сделали проверку на сумму в 100 рублей, а код ошибки - тоже 100, из-за этого при поверхностном взгляде путаница получается.