protected function doPrepareCheckInput() { return array('term' => '123456', 'amount' => '10.00', 'cur' => 'rub', 'city' => 12, 'name' => 'User Name', 'time' => self::time(), 'email' => uniqid() . '@example.com', 'to' => PaymentNumbers::getValidTo(), 'from' => PaymentNumbers::getValidFrom()); }
public static function response() { $list = array(__LINE__ => array('type' => 'check', 'input' => array('term' => '123456', 'amount' => '10.00', 'cur' => 'rub', 'city' => 12, 'name' => 'User Name', 'time' => self::time(), 'email' => uniqid() . '@example.com', 'to' => PaymentNumbers::getValidTo(), 'from' => PaymentNumbers::getValidFrom()), 'dataPayment' => array('term' => '123456', 'type' => 'check', 'code' => '', 'amount' => '10.00', 'cur' => 'rub', 'status' => Status::ENABLED, 'time' => date('Y-m-d H:i:s', self::time()))), __LINE__ => array('type' => 'check', 'input' => array('term' => '123456', 'amount' => '10.00', 'cur' => 'rub', 'city' => 13, 'name' => 'User Name', 'time' => self::time(), 'email' => uniqid() . '@example.com', 'to' => PaymentNumbers::getValidTo(), 'from' => PaymentNumbers::getValidFrom()), 'dataPayment' => array('type' => 'error', 'code' => 1, 'time' => self::time(), 'message' => 'Undefined city id')), __LINE__ => array('type' => 'check', 'input' => array('term' => '123456', 'amount' => '0.00', 'cur' => 'rub', 'city' => 13, 'name' => 'User Name', 'time' => self::time(), 'email' => uniqid() . '@example.com', 'to' => PaymentNumbers::getValidTo(), 'from' => PaymentNumbers::getValidFrom()), 'dataPayment' => array('type' => 'error', 'code' => 901, 'time' => self::time(), 'message' => 'Invalid parameter value (Invalid amount)'))); // sign4all responses foreach ($list as &$value) { if (empty($value['input']['sign'])) { Secure::sign($value['input'], $value['type'], 'secret'); } } return $list; }
</div> <div class="panel-body"> <div class="col-md-4 post-check"> <div class="form-group"> <?php Views::label('from'); Views::text('from', $from = PaymentNumbers::getValidFrom()); ?> </div> <div class="form-group"> <?php Views::label('to'); Views::text('to', $to = PaymentNumbers::getValidTo()); ?> </div> <div class="form-group"> <?php Views::label('city'); Views::text('city', 1); ?> </div> <div class="form-group"> <?php Views::label('amount', 'Сумма/валюта'); Views::text('amount', '123.45', array('size' => 10, 'style' => 'width: 100px; display: inline; margin-left: 10px;')); Views::text('cur', 'RUB', array('size' => 3, 'style' => 'width: 50px; display: inline; margin-left: 10px;'));