PostgreSQL возвращает 42P01 даже после сохранения данных в данной таблице

Я использую SPOT ORM и тонкий фреймворк с PHP.

$new_payment["payment_method"] = 'paytm';
$new_payment["created_at"] = $date;
$new_payment["payment_link"] = $url;
$new_payment["payment_status"] = "started";
$new_payment["request_id"] = $request_id;
$new_payment["qr_data"] = $qr_data;
$new_payment["extra_data"] = $curlResponse->response;
$new_payment["amount"] = $amount;
$new_payment["machine_id"] = $machine_id;
$payment_info = new Payment_Info($new_payment);
$is_success = $this->spot->mapper("App\Payment_Info")->save($payment_info);

Вышеуказанные утверждения сохраняют $new_payment объект в payment_info стол, но он возвращается status code:42P01

мой Payment_Info учебный класс-

    class Payment_Info extends \Spot\Entity
{
protected static $table = "payment_info";

public static function fields()
{
return [
"payment_info_id" => ["type" => "bigint", "unsigned" => true, "primary" => true, "autoincrement" => true],//Primary key <tablename>_id
"created_at" => ["type" => "datetime", "required" => true, "value" => new \DateTime()], // Creation timestamp
"payment_method" => ["type" => "string", "required" => true], // ["PayTm","UPI","MSwipe",etc]
"payment_link" => ["type" => "text"], // payment link of selected method on which payment is done
"payment_status" => ["type" => "string", "required" => true], // ["completed","cancelled"]
"request_id" => ["type" => "bigint", "required" => true], //Request Id against which the payment info was generated
"qr_data" => ["type" => "text"],//qr data or any other specific data that is requied to complete the payment
"extra_data" => ["type" => "json_array"], //Extra data recieved after payment completion
"amount" => ["type" => "float"], //Amount for which the payment info was generated
"machine_id" => ["type" => "bigint", "required" => true]
];
}

public static function relations(Mapper $mapper, Entity $entity){
return [
"Request" => $mapper->belongsTo($entity, 'App\Request','request_id')
];
}
}

Ответ получаю:

Fatal error:  Uncaught InvalidArgumentException: Invalid HTTP status code in /Users/apple/Desktop/wendor/instabox-api/vendor/slim/slim/Slim/Http/Response.php:222
Stack trace:
#0 /Users/apple/Desktop/wendor/instabox-api/vendor/slim/slim/Slim/Http/Response.php(191): Slim\Http\Response->filterStatus('42P01')
#1 /Users/apple/Desktop/wendor/instabox-api/src/Slim/Handlers/ApiError.php(48): Slim\Http\Response->withStatus('42P01')
#2 [internal function]: Slim\Handlers\ApiError->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(PDOException))
#3 /Users/apple/Desktop/wendor/instabox-api/vendor/slim/slim/Slim/App.php(665): call_user_func_array(Object(Slim\Handlers\ApiError), Array)
#4 /Users/apple/Desktop/wendor/instabox-api/vendor/slim/slim/Slim/App.php(390): Slim\App->handleException(Object(PDOException), Object(Slim\Http\Request), Object(Slim\Http\Response))
#5 /Users/apple/Desktop/wendor/instabox-api/vendor/slim/slim/Slim/App.php(296): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
in /Users/apple/Desktop/wendor/instabox-api/vendor/slim/slim/Slim/Http/Response.php on line 222

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector