apiato / payment-container

An Apiato container which acts as a generic foundation to "plug in" different containers that interacts with specific payment gateways (e.g., PayPal, Stripe, ...)
MIT License
1 stars 1 forks source link

Can't create a payment account when create a stripe account #2

Open andrekutianski opened 2 years ago

andrekutianski commented 2 years ago

Description:

I'm trying to create a stripe account but when the task try to execute the AssignPaymentAccountToUserTask class return error and not create payment account.

Expected Behavior:

An associated payment account for stripe account submitted.

Versions:

Steps To Reproduce:

Make a POST to /user/payments/accounts/stripe:

{
    "customer_id": "cus_HzDAOlCpLWqm0x",
    "card_id": "pm_1HPEkRLvuz1aCBcRX0jR4lvG",
    "card_funding": "0",
    "card_last_digits": "1111",
    "card_fingerprint": "rE2zk9DlbWcp8KNG",
    "nickname": "acc nickname"
}

Additional Context:

See https://github.com/apiato/payment-container/issues/1

The returned log message:

{"message":"Failed to create Resource.","errors":[],"exception":"App\\Ship\\Exceptions\\Handlers\\ExceptionsHandler","file":"\/var\/www\/api\/app\/Containers\/Vendor\/Payment\/Tasks\/AssignPaymentAccountToUserTask.php","line":24,"trace":[{"file":"\/var\/www\/api\/app\/Containers\/Vendor\/Stripe\/Actions\/CreateStripeAccountAction.php","line":28,"function":"run","class":"App\\Containers\\Vendor\\Payment\\Tasks\\AssignPaymentAccountToUserTask","type":"->","args":[{"customer_id":"cus_HzDAOlCpLWqm0x","card_id":"pm_1HPEkRLvuz1aCBcRX0jR4lvG","card_funding":"0","card_last_digits":"1111","card_fingerprint":"rE2zk9DlbWcp8KNG","updated_at":"2021-12-28T16:39:54.000000Z","created_at":"2021-12-28T16:39:54.000000Z","id":10},{"id":2,"name":"Arthur Apiato","email":"arthur@apiato.com","email_verified_at":null,"gender":"male","birth":"1979-09-02","device":null,"platform":null,"is_admin":false,"created_at":"2021-12-25T16:40:50.000000Z","updated_at":"2021-12-25T16:40:50.000000Z","social_provider":null,"social_nickname":null,"social_id":null,"social_token":null,"social_token_secret":null,"social_refresh_token":null,"social_expires_in":null,"social_avatar":null,"social_avatar_original":null},"chuchu"]},{"file":"\/var\/www\/api\/app\/Containers\/Vendor\/Stripe\/UI\/API\/Controllers\/Controller.php","line":16,"function":"run","class":"App\\Containers\\Vendor\\Stripe\\Actions\\CreateStripeAccountAction","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[],"stateKeeperStates":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Controller.php","line":54,"function":"createStripeAccount","class":"App\\Containers\\Vendor\\Stripe\\UI\\API\\Controllers\\Controller","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[],"stateKeeperStates":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php","line":45,"function":"callAction","class":"Illuminate\\Routing\\Controller","type":"->","args":["createStripeAccount",[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[],"stateKeeperStates":[]}]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":262,"function":"dispatch","class":"Illuminate\\Routing\\ControllerDispatcher","type":"->","args":[{"uri":"v1\/user\/payments\/accounts\/stripe","methods":["POST"],"action":{"middleware":["api","throttle:60,1","auth:api"],"domain":"http:\/\/api.meussl.com","uses":"App\\Containers\\Vendor\\Stripe\\UI\\API\\Controllers\\Controller@createStripeAccount","controller":"App\\Containers\\Vendor\\Stripe\\UI\\API\\Controllers\\Controller@createStripeAccount","namespace":"\/var\/www\/api\/app\/Containers\/Vendor\/Stripe\\UI\\API\\Controllers","prefix":"\/v1","where":[],"as":"api_stripe_create_stripe_account"},"isFallback":false,"controller":{"ui":"api"},"defaults":[],"wheres":[],"parameters":[],"parameterNames":[],"computedMiddleware":["api","throttle:60,1","auth:api"],"compiled":[]},{"ui":"api"},"createStripeAccount"]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":205,"function":"runController","class":"Illuminate\\Routing\\Route","type":"->","args":[]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":695,"function":"run","class":"Illuminate\\Routing\\Route","type":"->","args":[]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":128,"function":"Illuminate\\Routing\\{closure}","class":"Illuminate\\Routing\\Router","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/app\/Ship\/Middlewares\/Http\/ProfilerMiddleware.php","line":15,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"App\\Ship\\Middlewares\\Http\\ProfilerMiddleware","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/app\/Ship\/Middlewares\/Http\/ProcessETagHeadersMiddleware.php","line":24,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"App\\Ship\\Middlewares\\Http\\ProcessETagHeadersMiddleware","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/app\/Ship\/Middlewares\/Http\/ValidateJsonContent.php","line":27,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"App\\Ship\\Middlewares\\Http\\ValidateJsonContent","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/SubstituteBindings.php","line":50,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\\Routing\\Middleware\\SubstituteBindings","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php","line":127,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php","line":63,"function":"handleRequest","class":"Illuminate\\Routing\\Middleware\\ThrottleRequests","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[],[{"key":"da4b9237bacccdf19c0760cab7aec4a8359010b0","maxAttempts":60,"decayMinutes":"1","responseCallback":null}]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\\Routing\\Middleware\\ThrottleRequests","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[],"60","1"]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php","line":44,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\\Auth\\Middleware\\Authenticate","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[],"api"]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":103,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":697,"function":"then","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[[]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":672,"function":"runRouteWithinStack","class":"Illuminate\\Routing\\Router","type":"->","args":[{"uri":"v1\/user\/payments\/accounts\/stripe","methods":["POST"],"action":{"middleware":["api","throttle:60,1","auth:api"],"domain":"http:\/\/api.meussl.com","uses":"App\\Containers\\Vendor\\Stripe\\UI\\API\\Controllers\\Controller@createStripeAccount","controller":"App\\Containers\\Vendor\\Stripe\\UI\\API\\Controllers\\Controller@createStripeAccount","namespace":"\/var\/www\/api\/app\/Containers\/Vendor\/Stripe\\UI\\API\\Controllers","prefix":"\/v1","where":[],"as":"api_stripe_create_stripe_account"},"isFallback":false,"controller":{"ui":"api"},"defaults":[],"wheres":[],"parameters":[],"parameterNames":[],"computedMiddleware":["api","throttle:60,1","auth:api"],"compiled":[]},{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":636,"function":"runRoute","class":"Illuminate\\Routing\\Router","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},{"uri":"v1\/user\/payments\/accounts\/stripe","methods":["POST"],"action":{"middleware":["api","throttle:60,1","auth:api"],"domain":"http:\/\/api.meussl.com","uses":"App\\Containers\\Vendor\\Stripe\\UI\\API\\Controllers\\Controller@createStripeAccount","controller":"App\\Containers\\Vendor\\Stripe\\UI\\API\\Controllers\\Controller@createStripeAccount","namespace":"\/var\/www\/api\/app\/Containers\/Vendor\/Stripe\\UI\\API\\Controllers","prefix":"\/v1","where":[],"as":"api_stripe_create_stripe_account"},"isFallback":false,"controller":{"ui":"api"},"defaults":[],"wheres":[],"parameters":[],"parameterNames":[],"computedMiddleware":["api","throttle:60,1","auth:api"],"compiled":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":625,"function":"dispatchToRoute","class":"Illuminate\\Routing\\Router","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php","line":167,"function":"dispatch","class":"Illuminate\\Routing\\Router","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":128,"function":"Illuminate\\Foundation\\Http\\{closure}","class":"Illuminate\\Foundation\\Http\\Kernel","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/barryvdh\/laravel-debugbar\/src\/Middleware\/InjectDebugbar.php","line":67,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Barryvdh\\Debugbar\\Middleware\\InjectDebugbar","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php","line":21,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/ConvertEmptyStringsToNull.php","line":31,"function":"handle","class":"Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php","line":21,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TrimStrings.php","line":40,"function":"handle","class":"Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\\Foundation\\Http\\Middleware\\TrimStrings","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/ValidatePostSize.php","line":27,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/PreventRequestsDuringMaintenance.php","line":86,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/vendor\/fruitcake\/laravel-cors\/src\/HandleCors.php","line":37,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Fruitcake\\Cors\\HandleCors","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/vendor\/fideloper\/proxy\/src\/TrustProxies.php","line":57,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Fideloper\\Proxy\\TrustProxies","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/app\/Containers\/Vendor\/Debugger\/Middlewares\/RequestsMonitorMiddleware.php","line":15,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"App\\Containers\\Vendor\\Debugger\\Middlewares\\RequestsMonitorMiddleware","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]},[]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":103,"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php","line":142,"function":"then","class":"Illuminate\\Pipeline\\Pipeline","type":"->","args":[[]]},{"file":"\/var\/www\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php","line":111,"function":"sendRequestThroughRouter","class":"Illuminate\\Foundation\\Http\\Kernel","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]},{"file":"\/var\/www\/api\/public\/index.php","line":52,"function":"handle","class":"Illuminate\\Foundation\\Http\\Kernel","type":"->","args":[{"attributes":[],"request":[],"query":[],"server":[],"files":[],"cookies":[],"headers":[]}]}],"_profiler":{"__meta":{"id":"X15e5b148bd9577d158af8df356796ae8","datetime":"2021-12-28 16:39:55","utime":1640709595.030988,"method":"POST","uri":"\/v1\/user\/payments\/accounts\/stripe","ip":"192.168.0.1"},"messages":{"count":8,"messages":[{"message":"[16:39:54] LOG.info: pgsql (14.39): select * from \"oauth_access_tokens\" where \"id\" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1","message_html":null,"is_string":false,"label":"info","time":1640709594.931893,"collector":"log"},{"message":"[16:39:54] LOG.info: pgsql (1.74): select * from \"oauth_access_tokens\" where \"id\" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1","message_html":null,"is_string":false,"label":"info","time":1640709594.938111,"collector":"log"},{"message":"[16:39:54] LOG.info: pgsql (2.28): select * from \"oauth_clients\" where \"id\" = 3 limit 1","message_html":null,"is_string":false,"label":"info","time":1640709594.944889,"collector":"log"},{"message":"[16:39:54] LOG.info: pgsql (2.13): select * from \"users\" where \"id\" = 2 limit 1","message_html":null,"is_string":false,"label":"info","time":1640709594.95373,"collector":"log"},{"message":"[16:39:54] LOG.info: pgsql (1.64): select * from \"oauth_access_tokens\" where \"id\" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1","message_html":null,"is_string":false,"label":"info","time":1640709594.958519,"collector":"log"},{"message":"[16:39:54] LOG.info: pgsql (1.69): select * from \"oauth_clients\" where \"id\" = 3 limit 1","message_html":null,"is_string":false,"label":"info","time":1640709594.96337,"collector":"log"},{"message":"[16:39:55] LOG.info: pgsql (39.66): insert into \"stripe_accounts\" (\"customer_id\", \"card_id\", \"card_funding\", \"card_last_digits\", \"card_fingerprint\", \"updated_at\", \"created_at\") values (cus_HzDAOlCpLWqm0x, pm_1HPEkRLvuz1aCBcRX0jR4lvG, 0, 1111, rE2zk9DlbWcp8KNG, 2021-12-28 16:39:54, 2021-12-28 16:39:54) returning \"id\"","message_html":null,"is_string":false,"label":"info","time":1640709595.020116,"collector":"log"},{"message":"[16:39:55] LOG.error: Failed to create Resource. {\"userId\":2,\"exception\":{}}","message_html":null,"is_string":false,"label":"error","time":1640709595.025897,"collector":"log"}]},"time":{"start":1640709594.796518,"end":1640709595.031108,"duration":0.2345898151397705,"duration_str":"235ms","measures":[{"label":"Booting","start":1640709594.796518,"relative_start":0,"end":1640709594.878184,"relative_end":1640709594.878184,"duration":0.0816659927368164,"duration_str":"81.67ms","params":[],"collector":null},{"label":"Application","start":1640709594.878536,"relative_start":0.08201789855957031,"end":1640709595.031115,"relative_end":7.152557373046875e-6,"duration":0.15257906913757324,"duration_str":"153ms","params":[],"collector":null}]},"memory":{"peak_usage":6288888,"peak_usage_str":"6MB"},"exceptions":{"count":0,"exceptions":[]},"route":{"uri":"POST v1\/user\/payments\/accounts\/stripe","middleware":"api, throttle:60,1, auth:api","domain":"http:\/\/api.meussl.com","controller":"App\\Containers\\Vendor\\Stripe\\UI\\API\\Controllers\\Controller@createStripeAccount","namespace":"\/var\/www\/api\/app\/Containers\/Vendor\/Stripe\\UI\\API\\Controllers","prefix":"\/v1","where":[],"as":"api_stripe_create_stripe_account","file":"app\/Containers\/Vendor\/Stripe\/UI\/API\/Controllers\/Controller.php:14-22<\/a>"},"queries":{"nb_statements":7,"nb_failed_statements":0,"accumulated_duration":0.06352999999999999,"accumulated_duration_str":"63.53ms","statements":[{"sql":"select * from \"oauth_access_tokens\" where \"id\" = 'ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40' limit 1","type":"query","params":[],"bindings":["ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40"],"hints":null,"show_copy":false,"backtrace":[{"index":4,"namespace":null,"name":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php","line":45},{"index":16,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/TokenRepository.php","line":28},{"index":17,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/TokenRepository.php","line":100},{"index":18,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/Bridge\/AccessTokenRepository.php","line":88},{"index":19,"namespace":null,"name":"\/vendor\/league\/oauth2-server\/src\/AuthorizationValidators\/BearerTokenValidator.php","line":117}],"duration":0.01439,"duration_str":"14.39ms","stmt_id":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php:45","connection":"meussl_api"},{"sql":"select * from \"oauth_access_tokens\" where \"id\" = 'ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40' limit 1","type":"query","params":[],"bindings":["ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40"],"hints":null,"show_copy":false,"backtrace":[{"index":4,"namespace":null,"name":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php","line":45},{"index":16,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/TokenRepository.php","line":28},{"index":17,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/TokenRepository.php","line":100},{"index":18,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/Bridge\/AccessTokenRepository.php","line":88},{"index":19,"namespace":null,"name":"\/vendor\/league\/oauth2-server\/src\/AuthorizationValidators\/BearerTokenValidator.php","line":117}],"duration":0.00174,"duration_str":"1.74ms","stmt_id":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php:45","connection":"meussl_api"},{"sql":"select * from \"oauth_clients\" where \"id\" = '3' limit 1","type":"query","params":[],"bindings":["3"],"hints":null,"show_copy":false,"backtrace":[{"index":4,"namespace":null,"name":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php","line":45},{"index":16,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/ClientRepository.php","line":47},{"index":17,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/ClientRepository.php","line":58},{"index":18,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/Guards\/TokenGuard.php","line":130},{"index":19,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/Guards\/TokenGuard.php","line":92}],"duration":0.00228,"duration_str":"2.28ms","stmt_id":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php:45","connection":"meussl_api"},{"sql":"select * from \"users\" where \"id\" = '2' limit 1","type":"query","params":[],"bindings":["2"],"hints":null,"show_copy":false,"backtrace":[{"index":4,"namespace":null,"name":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php","line":45},{"index":16,"namespace":null,"name":"\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/EloquentUserProvider.php","line":53},{"index":17,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/PassportUserProvider.php","line":42},{"index":18,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/Guards\/TokenGuard.php","line":159},{"index":19,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/Guards\/TokenGuard.php","line":110}],"duration":0.00213,"duration_str":"2.13ms","stmt_id":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php:45","connection":"meussl_api"},{"sql":"select * from \"oauth_access_tokens\" where \"id\" = 'ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40' limit 1","type":"query","params":[],"bindings":["ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40"],"hints":null,"show_copy":false,"backtrace":[{"index":4,"namespace":null,"name":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php","line":45},{"index":16,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/TokenRepository.php","line":28},{"index":17,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/Guards\/TokenGuard.php","line":170},{"index":18,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/Guards\/TokenGuard.php","line":110},{"index":19,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/PassportServiceProvider.php","line":308}],"duration":0.00164,"duration_str":"1.64ms","stmt_id":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php:45","connection":"meussl_api"},{"sql":"select * from \"oauth_clients\" where \"id\" = '3' limit 1","type":"query","params":[],"bindings":["3"],"hints":null,"show_copy":false,"backtrace":[{"index":4,"namespace":null,"name":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php","line":45},{"index":16,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/ClientRepository.php","line":47},{"index":17,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/ClientRepository.php","line":229},{"index":18,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/Guards\/TokenGuard.php","line":178},{"index":19,"namespace":null,"name":"\/vendor\/laravel\/passport\/src\/Guards\/TokenGuard.php","line":110}],"duration":0.0016899999999999999,"duration_str":"1.69ms","stmt_id":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php:45","connection":"meussl_api"},{"sql":"insert into \"stripe_accounts\" (\"customer_id\", \"card_id\", \"card_funding\", \"card_last_digits\", \"card_fingerprint\", \"updated_at\", \"created_at\") values ('cus_HzDAOlCpLWqm0x', 'pm_1HPEkRLvuz1aCBcRX0jR4lvG', '0', '1111', 'rE2zk9DlbWcp8KNG', '2021-12-28 16:39:54', '2021-12-28 16:39:54') returning \"id\"","type":"query","params":[],"bindings":["cus_HzDAOlCpLWqm0x","pm_1HPEkRLvuz1aCBcRX0jR4lvG","0","1111","rE2zk9DlbWcp8KNG","2021-12-28 16:39:54","2021-12-28 16:39:54"],"hints":null,"show_copy":false,"backtrace":[{"index":4,"namespace":null,"name":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php","line":45},{"index":16,"namespace":null,"name":"\/vendor\/prettus\/l5-repository\/src\/Prettus\/Repository\/Eloquent\/BaseRepository.php","line":651},{"index":17,"namespace":null,"name":"\/app\/Containers\/Vendor\/Stripe\/Tasks\/CreateStripeAccountTask.php","line":22},{"index":18,"namespace":null,"name":"\/app\/Containers\/Vendor\/Stripe\/Actions\/CreateStripeAccountAction.php","line":26},{"index":19,"namespace":null,"name":"\/app\/Containers\/Vendor\/Stripe\/UI\/API\/Controllers\/Controller.php","line":16}],"duration":0.039659999999999994,"duration_str":"39.66ms","stmt_id":"\/vendor\/apiato\/core\/Abstracts\/Events\/Dispatcher\/Dispatcher.php:45","connection":"meussl_api"}]},"models":{"data":{"App\\Containers\\AppSection\\User\\Models\\User":1,"Laravel\\Passport\\Client":2,"Laravel\\Passport\\Token":3},"count":6},"swiftmailer_mails":{"count":0,"mails":[]},"logs":{"count":15,"messages":[{"message":"[2021-12-28 16:19:21] local.ERROR: Failed to create Resource. {\"userId\":2,\"exception\":\"[object] (App\\\\Ship\\\\Exceptions\\\\CreateResourceFailedException(code: 417): Failed to create Resource. at \/var\/www\/api\/app\/Containers\/Vendor\/Payment\/Tasks\/AssignPaymentAccountToUserTask.php:24)\n","message_html":null,"is_string":false,"label":"error","time":1640709594.906279},{"message":"[2021-12-28 16:19:21] local.INFO: pgsql (17.82): insert into \"stripe_accounts\" (\"customer_id\", \"card_id\", \"updated_at\", \"created_at\") values (cus_HzDAOlCpLWqm0x, pm_1HPEkRLvuz1aCBcRX0jR4lvG, 2021-12-28 16:19:21, 2021-12-28 16:19:21) returning \"id\" \n","message_html":null,"is_string":false,"label":"info","time":1640709594.906284},{"message":"[2021-12-28 16:19:21] local.INFO: pgsql (1.37): select * from \"oauth_clients\" where \"id\" = 3 limit 1 \n","message_html":null,"is_string":false,"label":"info","time":1640709594.906285},{"message":"[2021-12-28 16:19:21] local.INFO: pgsql (1.46): select * from \"oauth_access_tokens\" where \"id\" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1 \n","message_html":null,"is_string":false,"label":"info","time":1640709594.906287},{"message":"[2021-12-28 16:19:21] local.INFO: pgsql (1.95): select * from \"users\" where \"id\" = 2 limit 1 \n","message_html":null,"is_string":false,"label":"info","time":1640709594.906288},{"message":"[2021-12-28 16:19:21] local.INFO: pgsql (1.67): select * from \"oauth_clients\" where \"id\" = 3 limit 1 \n","message_html":null,"is_string":false,"label":"info","time":1640709594.90629},{"message":"[2021-12-28 16:19:21] local.INFO: pgsql (1.58): select * from \"oauth_access_tokens\" where \"id\" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1 \n","message_html":null,"is_string":false,"label":"info","time":1640709594.906291},{"message":"[2021-12-28 16:19:21] local.INFO: pgsql (10.53): select * from \"oauth_access_tokens\" where \"id\" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1 \n","message_html":null,"is_string":false,"label":"info","time":1640709594.906293},{"message":"[2021-12-28 16:18:50] local.INFO: pgsql (2.84): select \"roles\".*, \"model_has_roles\".\"model_id\" as \"pivot_model_id\", \"model_has_roles\".\"role_id\" as \"pivot_role_id\", \"model_has_roles\".\"model_type\" as \"pivot_model_type\" from \"roles\" inner join \"model_has_roles\" on \"roles\".\"id\" = \"model_has_roles\".\"role_id\" where \"model_has_roles\".\"model_id\" = 2 and \"model_has_roles\".\"model_type\" = App\\Containers\\AppSection\\User\\Models\\User \n","message_html":null,"is_string":false,"label":"info","time":1640709594.906294},{"message":"[2021-12-28 16:18:50] local.INFO: pgsql (1.28): select * from \"oauth_clients\" where \"id\" = 3 limit 1 \n","message_html":null,"is_string":false,"label":"info","time":1640709594.906296},{"message":"[2021-12-28 16:18:50] local.INFO: pgsql (1.34): select * from \"oauth_access_tokens\" where \"id\" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1 \n","message_html":null,"is_string":false,"label":"info","time":1640709594.906297},{"message":"[2021-12-28 16:18:50] local.INFO: pgsql (2.22): select * from \"users\" where \"id\" = 2 limit 1 \n","message_html":null,"is_string":false,"label":"info","time":1640709594.906298},{"message":"[2021-12-28 16:18:50] local.INFO: pgsql (2.46): select * from \"oauth_clients\" where \"id\" = 3 limit 1 \n","message_html":null,"is_string":false,"label":"info","time":1640709594.9063},{"message":"[2021-12-28 16:18:50] local.INFO: pgsql (1.6): select * from \"oauth_access_tokens\" where \"id\" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1 \n","message_html":null,"is_string":false,"label":"info","time":1640709594.906301},{"message":"[2021-12-28 16:18:50] local.INFO: pgsql (10.13): select * from \"oauth_access_tokens\" where \"id\" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1 ","message_html":null,"is_string":false,"label":"info","time":1640709594.906303}]},"auth":{"guards":{"web":"null","api":"array:2 [\n \"name\" => \"arthur@apiato.com\"\n \"user\" => array:20 [\n \"id\" => 2\n \"name\" => \"Arthur Apiato\"\n \"email\" => \"arthur@apiato.com\"\n \"email_verified_at\" => null\n \"gender\" => \"male\"\n \"birth\" => \"1979-09-02\"\n \"device\" => null\n \"platform\" => null\n \"is_admin\" => false\n \"created_at\" => \"2021-12-25T16:40:50.000000Z\"\n \"updated_at\" => \"2021-12-25T16:40:50.000000Z\"\n \"social_provider\" => null\n \"social_nickname\" => null\n \"social_id\" => null\n \"social_token\" => null\n \"social_token_secret\" => null\n \"social_refresh_token\" => null\n \"social_expires_in\" => null\n \"social_avatar\" => null\n \"social_avatar_original\" => null\n ]\n]"},"names":"api: arthur@apiato.com"},"gate":{"count":0,"messages":[]}}}

Request debugger info:

[2021-12-28T16:39:55.038797+00:00] REQUESTS DEBUGGER.INFO: ----------------- NEW REQUEST -----------------

REQUEST INFO: 
 * Endpoint: http://api.apiato.test/v1/user/payments/accounts/stripe
 * Method: POST
 * IP: 192.168.0.1 (Port: 80) 
 * Format: json

USER INFO: 
 * Access Token: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzIiwianRpIjoiZWM4NDYzOTgz...
 * User: ID: 2 (Name: Arthur Apiato)
 * Device:  (Platform: ) 
 * Browser:  (Version: ) 
 * Languages: 

REQUEST DATA: 
 * customer_id=cus_HzDAOlCpLWqm0x + card_id=pm_1HPEkRLvuz1aCBcRX0jR4lvG + card_funding=0 + card_last_digits=1111 + card_fingerprint=rE2zk9DlbWcp8KNG + nickname=chuchu

RESPONSE DATA: 
 * {"message":"Failed to create Resource.","errors":[],"exception":"App\\Ship\\Exceptions\\Handlers\\ExceptionsHandler","file":"\/var\/www\/api\/app\/Containers\/Vendor\/Payment\/Tasks\/AssignPaymentAccountToUserTask.php","line":24,"trace":[{"file":"\/var\/www\/api\/app\/Containers\/Vendor\/Stripe\/Actions\/CreateStripeAccountAction.php","line":28,"function":"run","class":"App\\Containers\\Vendor\\Payment\\Tasks\\AssignPaymentAccountToUserTask","type":"->","args":[{"customer_id":"cus_HzDAOlCpLWqm0x","card_id":"pm_1HPEkRLvuz1aCBcRX0jR4lvG","card_funding":"0","card_last_digits":"1111","card_fingerprint":"rE2zk9DlbWcp8KNG","updated_at":"2021-12-28T16:39:54.000000Z","created_at":"2021-12-28T16:39:5...

Laravel Log:

[2021-12-28 16:39:54] local.INFO: pgsql (14.39): select * from "oauth_access_tokens" where "id" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1  
[2021-12-28 16:39:54] local.INFO: pgsql (1.74): select * from "oauth_access_tokens" where "id" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1  
[2021-12-28 16:39:54] local.INFO: pgsql (2.28): select * from "oauth_clients" where "id" = 3 limit 1  
[2021-12-28 16:39:54] local.INFO: pgsql (2.13): select * from "users" where "id" = 2 limit 1  
[2021-12-28 16:39:54] local.INFO: pgsql (1.64): select * from "oauth_access_tokens" where "id" = ec84639836986dc6768393fc8a5a39ead1edc8fdb2c6a1e417f77b46423c0759b3d4e7ba060dae40 limit 1  
[2021-12-28 16:39:54] local.INFO: pgsql (1.69): select * from "oauth_clients" where "id" = 3 limit 1  
[2021-12-28 16:39:55] local.INFO: pgsql (39.66): insert into "stripe_accounts" ("customer_id", "card_id", "card_funding", "card_last_digits", "card_fingerprint", "updated_at", "created_at") values (cus_HzDAOlCpLWqm0x, pm_1HPEkRLvuz1aCBcRX0jR4lvG, 0, 1111, rE2zk9DlbWcp8KNG, 2021-12-28 16:39:54, 2021-12-28 16:39:54) returning "id"  
[2021-12-28 16:39:55] local.ERROR: Failed to create Resource. {"userId":2,"exception":"[object] (App\\Ship\\Exceptions\\CreateResourceFailedException(code: 417): Failed to create Resource. at /var/www/api/app/Containers/Vendor/Payment/Tasks/AssignPaymentAccountToUserTask.php:24)
[stacktrace]
#0 /var/www/api/app/Containers/Vendor/Stripe/Actions/CreateStripeAccountAction.php(28): App\\Containers\\Vendor\\Payment\\Tasks\\AssignPaymentAccountToUserTask->run(Object(App\\Containers\\Vendor\\Stripe\\Models\\StripeAccount), Object(App\\Containers\\AppSection\\User\\Models\\User), 'chuchu')
apiato/apiato#1 /var/www/api/app/Containers/Vendor/Stripe/UI/API/Controllers/Controller.php(16): App\\Containers\\Vendor\\Stripe\\Actions\\CreateStripeAccountAction->run(Object(App\\Containers\\Vendor\\Stripe\\UI\\API\\Requests\\CreateStripeAccountRequest))
apiato/apiato#2 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Containers\\Vendor\\Stripe\\UI\\API\\Controllers\\Controller->createStripeAccount(Object(App\\Containers\\Vendor\\Stripe\\UI\\API\\Requests\\CreateStripeAccountRequest))
apiato/apiato#3 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('createStripeAcc...', Array)
apiato/apiato#4 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Containers\\Vendor\\Stripe\\UI\\API\\Controllers\\Controller), 'createStripeAcc...')
apiato/apiato#5 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\Route->runController()
apiato/apiato#6 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(695): Illuminate\\Routing\\Route->run()
apiato/apiato#7 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#8 /var/www/api/app/Ship/Middlewares/Http/ProfilerMiddleware.php(15): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#9 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Ship\\Middlewares\\Http\\ProfilerMiddleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#10 /var/www/api/app/Ship/Middlewares/Http/ProcessETagHeadersMiddleware.php(24): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#11 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Ship\\Middlewares\\Http\\ProcessETagHeadersMiddleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#12 /var/www/api/app/Ship/Middlewares/Http/ValidateJsonContent.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#13 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Ship\\Middlewares\\Http\\ValidateJsonContent->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#14 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#15 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#16 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#17 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(63): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequest(Object(Illuminate\\Http\\Request), Object(Closure), Array)
apiato/apiato#18 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle(Object(Illuminate\\Http\\Request), Object(Closure), '60', '1')
apiato/apiato#19 /var/www/api/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#20 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Auth\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure), 'api')
apiato/apiato#21 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#22 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(697): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
apiato/apiato#23 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(672): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
apiato/apiato#24 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
apiato/apiato#25 /var/www/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
apiato/apiato#26 /var/www/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
apiato/apiato#27 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#28 /var/www/api/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#29 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#30 /var/www/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#31 /var/www/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#32 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#33 /var/www/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#34 /var/www/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#35 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#36 /var/www/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#37 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#38 /var/www/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#39 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#40 /var/www/api/vendor/fruitcake/laravel-cors/src/HandleCors.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#41 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\\Cors\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#42 /var/www/api/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#43 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#44 /var/www/api/app/Containers/Vendor/Debugger/Middlewares/RequestsMonitorMiddleware.php(15): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#45 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Containers\\Vendor\\Debugger\\Middlewares\\RequestsMonitorMiddleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
apiato/apiato#46 /var/www/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
apiato/apiato#47 /var/www/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
apiato/apiato#48 /var/www/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
apiato/apiato#49 /var/www/api/public/index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
apiato/apiato#50 {main}
"} 
andrekutianski commented 2 years ago

I believe that I found the problem.

User's model miss the method paymentAccounts:

    public function paymentAccounts(): MorphOne
    {
        return $this->morphOne(PaymentAccount::class, 'accountable');
    }

After add this to User model file all looks good after create a new payment account.

{
    "message": "Stripe account created successfully.",
    "stripe_account_id": 1,
    "_profiler": {
        "__meta": {
            "id": "Xa55be6ab35ca259aab0e04d50368256c",
            "datetime": "2022-01-03 15:32:28",
            "utime": 1641223948.320733,
            "method": "POST",
            "uri": "/v1/user/payments/accounts/stripe",
            "ip": "192.168.0.1"
        },
        "messages": {
            "count": 0,
            "messages": []
        },
}
andrekutianski commented 2 years ago

I believe that I found the problem.

User's model miss the method paymentAccounts:

    public function paymentAccounts(): MorphOne
    {
        return $this->morphOne(PaymentAccount::class, 'accountable');
    }

After add this to User model file all looks good after create a new payment account.

{
    "message": "Stripe account created successfully.",
    "stripe_account_id": 1,
    "_profiler": {
        "__meta": {
            "id": "Xa55be6ab35ca259aab0e04d50368256c",
            "datetime": "2022-01-03 15:32:28",
            "utime": 1641223948.320733,
            "method": "POST",
            "uri": "/v1/user/payments/accounts/stripe",
            "ip": "192.168.0.1"
        },
        "messages": {
            "count": 0,
            "messages": []
        },
}

This partially solve the problem, but I found more methods missing. I have a conclusion that the payment container is not fully operational.

mderis commented 2 years ago

This container is a very old container of apiato and we expect many functionalities not work properly or things missing! PRs are welcome for maintaining this useful container.

andrekutianski commented 2 years ago

This container is a very old container of apiato and we expect many functionalities not work properly or things missing! PRs are welcome for maintaining this useful container.

on Apiato v11 the release notes say that the support to payment was drop off https://github.com/apiato/apiato/releases/tag/v11.0.0