Commit 4a64385c by Administrator

Merge branch 'dev_dtx' into 'master'

Dev dtx

See merge request !6
2 parents 87543a05 8d486425
......@@ -41,6 +41,8 @@ class Refund
Config::YS_REFUND,//易生支付
Config::YSE_REFUND,//银盛支付
Config::WNF_REFUND //微诺付
];
/**
......
<?php
namespace Payment\Common\WNFpay\Data;
use Payment\Common\PayException;
use Payment\Common\WNFpay\WNFBaseData;
class RefundData extends WNFBaseData
{
/**
* 构建用于支付退款的签名相关数据
*
* @return void
*/
protected function buildData(){
$data = [
'orderNo' => $this->orderNo ,
'refundReason' => $this->refundReason ,
];
$this->retData = $data;
}
/**
* 参数校验
* @return mixed|void
* @throws PayException
*/
protected function checkDataParam(){
if(empty($this->orderNo)){
throw new PayException('退款订单号不能为空');
}
}
}
\ No newline at end of file
......@@ -70,7 +70,7 @@ class PubChargeData extends ChargeBaseData
'time_start' => $this->timeStart,
'time_expire' => $this->timeout_express,
'openid' => $this->openid,
'goods_tag' => $this->goods_tag ?? '',//订单优惠标记,参与立减金
// 服务商模式
'sub_appid' => $this->sub_appid,
'sub_mch_id' => $this->sub_mch_id,
......
......@@ -27,6 +27,7 @@ use Payment\Common\PayException;
* @property string $terminal_id 终端设备号(门店号或收银设备ID),默认请传"WEB"
* @property string $sub_appid
* @property string $sub_mch_id 终端设备号(门店号或收银设备ID),默认请传"WEB"
* @property string $goods_tag 订单优惠标记
*
*
* @package Payment\Common\Weixin\Data
......
......@@ -7,11 +7,17 @@ use Payment\Utils\ArrayUtil;
class WnfConfig extends ConfigInterface
{
/**
* 客户域名不可用,暂时使用IP,后期域名可用后在替换
*/
// 下单url
const PAY_URL = 'http://mall.sdinvoice.com/api/pay';
const PAY_URL = 'https://mall.jn-aisino.com/prod-api/api/pay';
// 查询url
const QUERY_URL = 'http://mall.sdinvoice.com/api/query';
const QUERY_URL = 'https://mall.jn-aisino.com/prod-api/api/query';
// 退款url
const REFUND_URL = 'https://mall.jn-aisino.com/prod-api/api/refund';
// 指定回调页面
public $returnUrl;
......
......@@ -271,4 +271,6 @@ final class Config{
const WNF_ALI_APP = 'wnf_ali_lite'; //支付宝支付
const WNF_QUERY = 'wnf_query'; //支付查询
const WNF_REFUND = 'wnf_refund'; //支付退款
}
<?php
namespace Payment\Refund;
use Payment\Common\WnfConfig;
use Payment\Common\WNFpay\Data\RefundData;
use Payment\Common\WNFpay\WNFBaseStrategy;
class WNFRefund extends WNFBaseStrategy
{
public function getBuildDataClass(){
return RefundData::class;
}
public function getReqUrl($url = null){
return parent::getReqUrl($url ?? WnfConfig::REFUND_URL);
}
}
\ No newline at end of file
......@@ -18,6 +18,7 @@ use Payment\Refund\MiRefund;
use Payment\Refund\SwRefund;
use Payment\Refund\SwThreeRefund;
use Payment\Refund\TLRefund;
use Payment\Refund\WNFRefund;
use Payment\Refund\WxRefund;
use Payment\Refund\YSRefund;
use Payment\Refund\YSERefund;
......@@ -77,8 +78,11 @@ class RefundContext
case Config::YSE_REFUND:
$this->refund = new YSERefund($config);
break;
case Config::WNF_REFUND:
$this->refund = new WNFRefund($config);
break;
default:
throw new PayException('当前仅支持:ALI WEIXIN CMB TL MI SW FU');
throw new PayException('当前仅支持:ALI WEIXIN CMB TL MI SW FU WNF');
}
} catch (PayException $e) {
throw $e;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!