Home > Backend Development > PHP Tutorial > Regarding the Alipay payment interface, what should my PHP provide to iOS? How to write it?

Regarding the Alipay payment interface, what should my PHP provide to iOS? How to write it?

PHP中文网
Release: 2023-03-01 08:38:02
Original
1304 people have browsed it

What php does is it needs to return a signature to ios or android and they pay by verifying the signature. //Alipay signature

 $list = array(
            'partner'                 =>$alipay_config['partner'],
            '_input_charset'          =>$alipay_config['input_charset'],
            'notify_url'              =>'http://notify.msp.hk/notify.htm',
            "return_url"              => $alipay_config['return_url'],
            "it_b_pay"                => "30m",
            'service'                 =>$alipay_config['service'],
            'seller_id'               =>$alipay_config['partner'],
            "anti_phishing_key"       =>$alipay_config['anti_phishing_key'],
            "exter_invoke_ip"         =>$alipay_config['exter_invoke_ip'],
        //订单号
            'out_trade_no'            =>$order_id,
        //商品名称
            'subject'                 =>$skills,
        //支付类型
            'payment_type'            =>'1',
        //金额
            'total_fee'               =>$recharge_moeny,
        //描述
            'body'                    =>$order_id,
    );
    //建立请求
    $alipaySubmit = new \AlipaySubmit($alipay_config);
    $html_text = $alipaySubmit->buildRequestParaToString($list);
    // 返回签名的数据
    return $html_text;
}

}
Copy after login

alipay/alipay.config.php The configuration file in the Alipay core file needs to configure your own Alipay secret key, etc.

Related articles:

Alipay payment interface single transaction query interface

Regarding the Alipay payment interface, what should my PHP provide to iOS? How to write it?

Regarding the Alipay payment interface, how to design automatic query of order status.

E-commerce websites use Alipay transfer payment function instead of Alipay payment interface

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template