Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment Notification error while using Postmark, 2.5.2.2 #965

Closed
btafoya opened this issue Jul 11, 2016 · 9 comments
Closed

Payment Notification error while using Postmark, 2.5.2.2 #965

btafoya opened this issue Jul 11, 2016 · 9 comments

Comments

@btafoya
Copy link

btafoya commented Jul 11, 2016

I received and fatal error when I entered a check payment from a client with the "Email payment receipt to the client" checked. I was able to determine that the payment was entered into the database successfully but failed when attempting to send the client notification. I recall another spot in the code that was missed when the postmark implementation happened and am thinking the same issue exists with the client payment notification.

@hillelcoren
Copy link
Member

What were the details of the error? If it wasn't shown on screen it should be in the logs in storage/logs/laravel-error.log.

@codedge
Copy link

codedge commented Jul 14, 2016

@btafoya Any details about the error?

@btafoya
Copy link
Author

btafoya commented Jul 15, 2016

This is the only error shown for that day:

[2016-07-05 18:11:01] production.ERROR: exception 'ErrorException' with message 'file_get_contents(http://api.phantomjscloud.com/api/browser/v2/8a9649c9dec3a7e010f358c19e70aecb24fbdcca/?request=%7Burl:%22https://{hostname_removed}/view/KChhdbPa2lYDexSaJfJ3VM4PIoqnJtc6?phantomjs=true%22,renderType:%22html%22%7D): failed to open stream: HTTP request failed! HTTP/1.0 401 Unauthorized ' in /{file_path_removed}/app/Models/Invoice.php:809 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_get_conten...', '/var/www/accoun...', 809, Array) #1 /{file_path_removed}/app/Models/Invoice.php(809): file_get_contents('http://api.phan...') #2 /{file_path_removed}/app/Ninja/Mailers/ContactMailer.php(239): App\Models\Invoice->getPDFString() #3 /{file_path_removed}/app/Http/Controllers/PaymentController.php(606): App\Ninja\Mailers\ContactMailer->sendPaymentConfirmation(Object(App\Models\Payment)) #4 [internal function]: App\Http\Controllers\PaymentController->store(Object(App\Http\Requests\CreatePaymentRequest)) #5 /{file_path_removed}/bootstrap/cache/compiled.php(9426): call_user_func_array(Array, Array) #6 /{file_path_removed}/bootstrap/cache/compiled.php(9488): Illuminate\Routing\Controller->callAction('store', Array) #7 /{file_path_removed}/bootstrap/cache/compiled.php(9468): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\PaymentController), Object(Illuminate\Routing\Route), 'store') #8 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #9 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #10 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #11 /{file_path_removed}/bootstrap/cache/compiled.php(9945): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #12 /{file_path_removed}/bootstrap/cache/compiled.php(9469): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #13 /{file_path_removed}/bootstrap/cache/compiled.php(9456): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\PaymentController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'store') #14 /{file_path_removed}/bootstrap/cache/compiled.php(8524): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'store') #15 /{file_path_removed}/bootstrap/cache/compiled.php(8511): Illuminate\Routing\Route->runController(Object(Illuminate\Http\Request)) #16 /{file_path_removed}/bootstrap/cache/compiled.php(8225): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request)) #17 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #18 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #19 /{file_path_removed}/app/Http/Middleware/Authenticate.php(69): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #20 [internal function]: App\Http\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure), 'user') #21 /{file_path_removed}/bootstrap/cache/compiled.php(9960): call_user_func_array(Array, Array) #22 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request)) #23 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #24 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #25 /{file_path_removed}/bootstrap/cache/compiled.php(9945): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #26 /{file_path_removed}/bootstrap/cache/compiled.php(8226): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #27 /{file_path_removed}/bootstrap/cache/compiled.php(8217): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request)) #28 /{file_path_removed}/bootstrap/cache/compiled.php(8207): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) #29 /{file_path_removed}/bootstrap/cache/compiled.php(2409): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #30 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request)) #31 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #32 /{file_path_removed}/app/Http/Middleware/StartupCheck.php(190): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #33 [internal function]: App\Http\Middleware\StartupCheck->handle(Object(Illuminate\Http\Request), Object(Closure)) #34 /{file_path_removed}/bootstrap/cache/compiled.php(9960): call_user_func_array(Array, Array) #35 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request)) #36 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #37 /{file_path_removed}/app/Http/Middleware/DuplicateSubmissionCheck.php(33): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #38 [internal function]: App\Http\Middleware\DuplicateSubmissionCheck->handle(Object(Illuminate\Http\Request), Object(Closure)) #39 /{file_path_removed}/bootstrap/cache/compiled.php(9960): call_user_func_array(Array, Array) #40 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request)) #41 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #42 /{file_path_removed}/bootstrap/cache/compiled.php(3203): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #43 /{file_path_removed}/app/Http/Middleware/VerifyCsrfToken.php(43): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure)) #44 [internal function]: App\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure)) #45 /{file_path_removed}/bootstrap/cache/compiled.php(9960): call_user_func_array(Array, Array) #46 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request)) #47 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #48 /{file_path_removed}/bootstrap/cache/compiled.php(13409): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #49 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #50 /{file_path_removed}/bootstrap/cache/compiled.php(9960): call_user_func_array(Array, Array) #51 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request)) #52 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #53 /{file_path_removed}/bootstrap/cache/compiled.php(11955): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #54 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #55 /{file_path_removed}/bootstrap/cache/compiled.php(9960): call_user_func_array(Array, Array) #56 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request)) #57 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #58 /{file_path_removed}/bootstrap/cache/compiled.php(13148): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #59 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure)) #60 /{file_path_removed}/bootstrap/cache/compiled.php(9960): call_user_func_array(Array, Array) #61 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request)) #62 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #63 /{file_path_removed}/bootstrap/cache/compiled.php(13085): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #64 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure)) #65 /{file_path_removed}/bootstrap/cache/compiled.php(9960): call_user_func_array(Array, Array) #66 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request)) #67 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #68 /{file_path_removed}/bootstrap/cache/compiled.php(3264): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #69 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure)) #70 /{file_path_removed}/bootstrap/cache/compiled.php(9960): call_user_func_array(Array, Array) #71 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request)) #72 /{file_path_removed}/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #73 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request)) #74 /{file_path_removed}/bootstrap/cache/compiled.php(9945): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #75 /{file_path_removed}/bootstrap/cache/compiled.php(2356): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #76 /{file_path_removed}/bootstrap/cache/compiled.php(2340): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request)) #77 /{file_path_removed}/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #78 {main} [] []

@btafoya
Copy link
Author

btafoya commented Jul 20, 2016

Did this get resolved in one of the recent releases? Just following up as I saw no reply. Thanks again!

@hillelcoren
Copy link
Member

I'm not able to reproduce the problem, I think the key part of the error is:

file_get_contents(http://api.phantomjscloud.com/...): failed to open stream

Can you check that you can access api.phantomjscloud.com from your server.

@btafoya
Copy link
Author

btafoya commented Jul 20, 2016

Yes, no issue. The PDF is being generated within the invoice view, etc.

@hillelcoren
Copy link
Member

phantomjscloud is only used for cases where the invoice isn't shown on screen before it's emailed, another place it's used is the command to email recurring invoices.

@btafoya
Copy link
Author

btafoya commented Jul 20, 2016

I found the issue.... it is using a demo key instead of the key entered in the .env file. I was able to validate that the url in the above failure message works when I substitute a valid API key.

@hillelcoren
Copy link
Member

Great, thanks for letting us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants