<?php
namespace app\callback\controller;

use app\callback\BaseController;
use asc\line\LinePay as LPay;

// use think\facade\View;
// use think\facade\Db;

class LinePay extends BaseController
{
    public function confirm()
    {
        $r_data = [
            'amount' => 250,
            'currency' => 'TWD'
        ];

        $lp = new LPay('1657811805','53a912dfa167b5e767847c7e9fca4ea1');
        $result = $lp->confirm(input('transactionId'),$r_data);

        print_r($result);
        // if(!$result['returnCode']=='0000'){
        //     return $this->Error('付款失敗');
        // }
    }

    public function cancel()
    {
        return 'cancel';
    }

}
