Home >Backend Development >PHP Tutorial >PHP Alipay interface usage analysis_PHP tutorial
This article mainly introduces the usage of php Alipay interface, and analyzes the usage skills of php Alipay interface in detail in the form of examples, which has certain reference. Value, friends in need can refer to it
The example in this article describes the usage of php Alipay interface. Share it with everyone for your reference. The specific analysis is as follows:
Alipay is the leader among popular website support platforms now. Now we will tell you how to use Alipay API for third-party payment and put Alipay on your own website. The code is as follows:
alipay_config.php configuration program is as follows:
The code is as follows:
The code is as follows:
The code is as follows:
require_once("alipay_config.php");
require_once("alipay.php");
$cmd = '0001';
$subject = "订单号:".$aliorder;
$body = '商品介绍';
$order_no = $aliorder;
$price = $alimoney;
$url = 'www.jb51.net';//你的网址
$type = '1';
$number = '1';
$transport = $alimailtype;
$ordinary_fee = '0.00';
$express_fee = '0.00';
$readonly = 'true';
$buyer_msg = $alibody;
$seller = $selleremail;
$buyer = '';
$buyer_name = $aliname;
$buyer_address = $aliaddress;
$buyer_zipcode = $alizipcode;
$buyer_tel = $aliphone;
$buyer_mobile = $alimob;
$partner = '2088002008096997';
$geturl = new alipay;
$link = $geturl->geturl
(
$cmd,$subject,$body,$order_no,$price,$url,$type,$number,$transport,
$ordinary_fee,$express_fee,$readonly,$buyer_msg,$seller,$buyer,
$buyer_name,$buyer_address,$buyer_zipcode,$buyer_tel,$buyer_mobile,$partner,
$interfaceurl,$payalikey
);
?>
希望本文所述对大家的php程序设计有所帮助。