src/AppBundle/Controller/Cashier/AlipayController.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace AppBundle\Controller\Cashier;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class AlipayController extends PaymentController
{
public function notifyAction(Request $request, $payment)
{
$data = $request->request->all();
$data['platform_type'] = 'Web';
$result = $this->getPayService()->notifyPaid($payment, $data);
return $this->createJsonResponse($result);
}
public function returnAction(Request $request, $payment)
{
$data = $request->query->all();
$data['platform_type'] = 'Web';
$this->getPayService()->notifyPaid($payment, $data);
return $this->redirect($this->generateUrl('cashier_pay_success', array('trade_sn' => $data['out_trade_no']), true));
}
public function returnForH5Action(Request $request, $payment)
{
$data = $request->query->all();
$data['platform_type'] = 'Wap';
$this->getPayService()->notifyPaid($payment, $data);
return $this->redirect($this->generateUrl('cashier_pay_success_for_h5', array('trade_sn' => $data['out_trade_no']), true));
}
public function returnForAppAction(Request $request)
{
$data = $request->query->all();
$data['platform_type'] = 'Wap';
try {
$this->getPayService()->notifyPaid('alipay', $data);
return new Response("<script type='text/javascript'>window.location='objc://alipayCallback?1';</script>");
} catch (\Exception $e) {
return new Response("<script type='text/javascript'>window.location='objc://alipayCallback?0';</script>");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。