<commit_before><?php

namespace Codeages\Biz\Framework\Pay\Payment;


use Codeages\Biz\Framework\Service\Exception\InvalidArgumentException;
use Codeages\Biz\Framework\Util\ArrayToolkit;

class LianlianPayGetway extends AbstractGetway
{
    protected $url = 'https://yintong.com.cn/payment/bankgateway.htm';

    protected $isWap = false;

    public function createTrade($data)
    {
        if (!ArrayToolkit::requireds($data, array(
            'goods_title',
            'goods_detail',
            'attach',
            'trade_sn',
            'amount',
            'notify_url',
            'return_url',
            'create_ip',
        ))) {
            throw new InvalidArgumentException('trade args is invalid.');
        }

        $platformType = empty($data['platform_type']) ? 'Web' : $data['platform_type'];

        if ($platformType == 'Wap') {
            $this->url = 'https://yintong.com.cn/llpayh5/payment.htm';
            $this->isWap = true;
        }

        return $this->convertParams($data);
    }



    public function converterNotify($data)
    {
        $data = ArrayToolkit::parts($data, array(
            'oid_partner',
            'sign_type',
            'sign',
            'dt_order',
            'no_order',
            'oid_paybill',
            'money_order',
            'result_pay',
            'settle_date',<commit_msg>fix lianlianpay title<commit_after><?php

namespace Codeages\Biz\Framework\Pay\Payment;


use Codeages\Biz\Framework\Service\Exception\InvalidArgumentException;
use Codeages\Biz\Framework\Util\ArrayToolkit;

class LianlianPayGetway extends AbstractGetway
{
    protected $url = 'https://yintong.com.cn/payment/bankgateway.htm';

    protected $isWap = false;

    public function createTrade($data)
    {
        if (!ArrayToolkit::requireds($data, array(
            'goods_title',
            'goods_detail',
            'attach',
            'trade_sn',
            'amount',
            'notify_url',
            'return_url',
            'create_ip',
        ))) {
            throw new InvalidArgumentException('trade args is invalid.');
        }

        $platformType = empty($data['platform_type']) ? 'Web' : $data['platform_type'];

        if ($platformType == 'Wap') {
            $this->url = 'https://yintong.com.cn/llpayh5/payment.htm';
            $this->isWap = true;
        }

        $data = $this->convertParams($data);
        return array(
            'url' => $this->url.'?'.http_build_query($data),
            'data' => $data
        );
    }



    public function converterNotify($data)
    {
        $data = ArrayToolkit::parts($data, array(
            'oid_partner',
            'sign_type',
            'sign',
            'dt_order',
            'no_order',
            'oid_paybill',
            'money_order',
            'result_pay',
            'settle_date',
{'fraction_non_alphanumeric': 0.13472949389179756, 'fraction_numerical': 0.0006980802792321117, 'mean_word_length': 1.954639175257732, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3853419', 'n_tokens_mistral': 870, 'n_tokens_neox': 837, 'n_words': 137}