Laravel付款集成页面为空白

时间:2019-02-28 12:38:49

标签: php laravel-5

下面的代码

public function PayCCAvenue(Request $request)
{
    $parameters = [
        'tid' => '1233221223322',
        'order_id' => '1232212',
        'amount' => '1200.00',
        'firstname'=>'test',
        'email'=>'email@fffm.com',
        'phone'=>'7736190194',
        'productinfo'=>'sfszgvfsg'

    ];
    // gateway = CCAvenue 
    $order = Payment::gateway('CCAvenue')->prepare($parameters);
    //dd(Payment::process($order));
    return Payment::process($order);
}

退货后付款:: process($ order);页面变为空白。 dd(Payment :: process($ order));给结果。 尝试了不同的laravel软件包。相同的问题

1 个答案:

答案 0 :(得分:0)

旧代码

   public function payment(Request $request)
   {
       if ($request->payment_method == 1) {

          $this->paypalPAyment($request);

       } else if($request->payment_method == 1){

          $this->PayCCAvenue($request);

       }

    }


    public function PayCCAvenue(Request $request)
    {
        $parameters = [
            'tid' => '1233221223322',
            'order_id' => '1232212',
            'amount' => '1200.00',
            'firstname'=>'test',
            'email'=>'email@fffm.com',
            'phone'=>'7736190194',
            'productinfo'=>'sfszgvfsg'

        ];
        // gateway = CCAvenue 
        $order = Payment::gateway('CCAvenue')->prepare($parameters);
        //dd(Payment::process($order));
        return Payment::process($order);
    }

工作代码

  public function payment(Request $request)
       {
           if ($request->payment_method == 1) {

              $this->paypalPAyment($request);

           } else if($request->payment_method == 1){

                  $parameters = [
                    'tid' => '1233221223322',
                    'order_id' => '1232212',
                    'amount' => '1200.00',
                    'firstname'=>'test',
                    'email'=>'email@fffm.com',
                    'phone'=>'7736190194',
                    'productinfo'=>'sfszgvfsg'

            ];
            // gateway = CCAvenue 
            $order = Payment::gateway('CCAvenue')->prepare($parameters);
            //dd(Payment::process($order));
            return Payment::process($order);

           }

        }
  

不知道为什么当代码是laravel页面重定向不起作用   在       单独的功能。