src/ApiBundle/Api/Resource/Trade/Factory/LianlianPayWebTrade.php

(开头部分) 1KB

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

<?php

namespace ApiBundle\Api\Resource\Trade\Factory;

class LianlianPayWebTrade extends BaseTrade
{
    protected $payment = 'lianlianpay';

    protected $platformType = 'Web';

    public function getCustomFields($params)
    {
        $user = $this->getUser();

        return array(
            'attach' => array(
                'user_id' => $user['id'],
                'user_created_time' => $user['createdTime'],
                'identify_user_id' => $this->getIdentify().'_'.$user['id'],
                'bindPhone' => $this->processBindPhone($user),
            ),
        );
    }

    protected function getIdentify()
    {
        $identify = $this->getSettingService()->get('llpay_identify');
        if (empty($identify)) {
            $identify = substr(md5(uniqid()), 0, 12);
            $this->getSettingService()->set('llpay_identify', $identify);
        }

        return $identify;
    }

    private function processBindPhone($user)
    {
        $bindPhone = '';
        if (!empty($user['verifiedMobile'])) {
            $bindPhone = substr_replace($user['verifiedMobile'], '****', -4, 4);
        }

        return $bindPhone;
    }
}

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

AI 解读 AI

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

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