PHP code example of lineryz / joinpay
1. Go to this page and download the library: Download lineryz/joinpay library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lineryz / joinpay example snippets
$joinPayClient = $joinPayClient->driver('UniPay');// 使用驱动方式重新构造订单支付
$joinPayClient->setVerison('1.0')// 版本号
->setMerchantNo('')// 商户号 === 商户ID
->setOrderNo('')//
->setAmount()
->setProductName()
->setProductDesc()
->setMp()
->setNotifyUrl()
->setFrpCode()
->setMerchantBankCode()
->setIsShowPic()
->setOpenId()
->setAuthCode()
->setAppId()
->setTerminalNo()
->setTransactionModel()
->setTradeMerchantNo()
->setBuyerId()
->setDisablePayModel()
->send();
$joinPayClient = $joinPayClient->driver('Refund');// 使用驱动方式重新构造退款
$joinPayClient->setVerison('1.0')// 版本号
->setMerchantNo('')// 商户号 === 商户ID
->setOrderNo('') // 原支付订单号
->setRefundOrderNo() // 退款订单号
->setRefundAmount() // 退款金额
->setRefundReason() // 退款原因
->setNotifyUrl() // 服务器异步通知地址
->send();