创建条纹事件的挂钩我在浏览器中看到错误

时间:2019-10-26 14:49:18

标签: stripe-payments laravel-cashier

在使用Laravel Cashier的Laravel 5.8应用程序中,我订阅了Stripe Products,并希望为某些事件创建钩子。

在条纹应用程序的仪表板中,我将回调链接设置为我的网站 联合国routes / web.php:

Route::get('stripe_callback_event', 'PaymentController@stripe_callback_event')->name('stripe_callback_event');

在控制下,我尝试捕获日志事件,例如:

<?php

namespace App\Http\Controllers;

use Auth;
use Carbon\Carbon;
use Session;
use DB;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
...
use Stripe\Stripe;
use Stripe\Customer;
use Stripe\Charge;



class PaymentController extends MyAppController
{
    use funcsTrait;
    private $stripe_payment_key = 'stripe_payment';
    private $session_id = '';

    public function __construct()
    {
        \Log::info( '<pre>PaymentController stripe_callback_event -1::'.print_r(-1,true).'</pre>' );
    }

    public function stripe_callback_event( $payload )   // https://www.votes.my-demo-apps.tk/stripe_callback_event
    {
        \Log::info( '<pre>-20 PaymentController stripe_callback_event $payload::'.print_r(-2,true).'</pre>' );
        \Log::info( '<pre>-21 $payload::'.print_r($payload,true).'</pre>' );

    } 

在laravel应用的日志中,我看到了来自构造函数的消息,但没有看到来自stripe_callback_event的消息以及浏览器中的许多错误 https://imgur.com/a/jN9gw4A

我检查了防火墙选项:

# sudo ufw status numbered
Status: active

     To                         Action      From
     --                         ------      ----
[ 1] Apache Full                ALLOW IN    Anywhere                  
[ 2] 443                        ALLOW IN    Anywhere                  
[ 3] 80                         ALLOW IN    Anywhere                  
[ 4] 22/tcp                     ALLOW IN    Anywhere                  
[ 5] Apache Full (v6)           ALLOW IN    Anywhere (v6)             
[ 6] 443 (v6)                   ALLOW IN    Anywhere (v6)             
[ 7] 80 (v6)                    ALLOW IN    Anywhere (v6)             
[ 8] 22/tcp (v6)                ALLOW IN    Anywhere (v6)    

防火墙选项是否可能是这些错误的原因?如何解决?

0 个答案:

没有答案