src/AppBundle/Controller/Cashier/CallbackController.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

namespace AppBundle\Controller\Cashier;

use Symfony\Component\HttpFoundation\Request;
use AppBundle\Controller\BaseController;

class CallbackController extends BaseController
{
    public function notifyAction(Request $request, $payment)
    {
        $targetCallback = $this->getTargetCallback($payment);

        return $this->forward($targetCallback['notify'], array(
            'request' => $request,
            'payment' => $payment,
        ));
    }

    public function returnForH5Action(Request $request, $payment)
    {
        $targetCallback = $this->getTargetCallback($payment);

        return $this->forward($targetCallback['returnForH5'], array(
            'request' => $request,
            'payment' => $payment,
        ));
    }

    public function returnForAppAction(Request $request, $payment)
    {
        $targetCallback = $this->getTargetCallback($payment);

        return $this->forward($targetCallback['returnForApp'], array(
            'request' => $request,
            'payment' => $payment,
        ));
    }

    public function returnAction(Request $request, $payment)
    {
        $targetCallback = $this->getTargetCallback($payment);

        return $this->forward($targetCallback['return'], array(
            'request' => $request,
            'payment' => $payment,
        ));
    }

    protected function getTargetCallback($payment)
    {
        $payments = $this->get('extension.manager')->getPayments();
        if (!empty($payments[$payment])) {
            return $payments[$payment];
        }

        return null;
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。