mirror of
https://gitee.com/zoujingli/WeChatDeveloper.git
synced 2026-11-26 17:03:36 +08:00
Compare commits
No commits in common. "5b6b09b9557213ea15f3b68e9f6d6fcfecc80b1d" and "c4db8b7ee842e8f51981d80bb26fe87f2cc6aaa2" have entirely different histories.
5b6b09b955
...
c4db8b7ee8
@ -628,17 +628,4 @@ class Card extends BasicWeChat
|
||||
$url = "https://api.weixin.qq.com/card/pay/getorderlist?access_token=ACCESS_TOKEN";
|
||||
return $this->callPostApi($url, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取开卡插件参数
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws Exceptions\InvalidResponseException
|
||||
* @throws Exceptions\LocalCacheException
|
||||
*/
|
||||
public function getActivateUrl(array $data)
|
||||
{
|
||||
$url = "https://api.weixin.qq.com/card/membercard/activate/geturl?access_token=ACCESS_TOKEN";
|
||||
return $this->callPostApi($url, $data);
|
||||
}
|
||||
}
|
||||
@ -1,209 +0,0 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | WeChatDeveloper
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/WeChatDeveloper
|
||||
// | github 代码仓库:https://github.com/zoujingli/WeChatDeveloper
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace WeMini;
|
||||
|
||||
use WeChat\Contracts\BasicWeChat;
|
||||
|
||||
/**
|
||||
* 小程序运费险
|
||||
* Class Insurance
|
||||
* @package WeMini
|
||||
*/
|
||||
class Insurance extends BasicWeChat
|
||||
{
|
||||
|
||||
/**
|
||||
* 开通无忧退货接口
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function open()
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/business/insurance_freight/open?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, [], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询开通状态接口
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function queryOpen()
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/business/insurance_freight/query_open?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, [], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 投保接口(发货时投保)
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function createOrder($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/business/insurance_freight/createorder?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 理赔接口 (收到用户退货后再触发)
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function claim($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/business/insurance_freight/claim?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请充值订单号接口 (支持自定义金额)
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function createChargeId($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/business/insurance_freight/createchargeid?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请支付接口
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function applyPay($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/business/insurance_freight/applypay?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉取充值订单信息接口
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function getPayOrderList($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/business/insurance_freight/getpayorderlist?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 退款接口
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function refund($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/business/insurance_freight/refund?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉取摘要接口 (查询当前保费、投保单量、理赔单量、账号余额等信息)
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function getSummary($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/business/insurance_freight/getsummary?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉取保单信息接口
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function getOrderList($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/business/insurance_freight/getorderlist?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置告警余额接口
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function updateNotifyFunds($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/business/insurance_freight/update_notify_funds?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建退货 ID
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function returnAdd($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/cgi-bin/express/delivery/no_worry_return/add?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询退货 ID 状态
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function returnGet($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/cgi-bin/express/delivery/no_worry_return/get?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查解绑退货 ID
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function returnUbind($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/cgi-bin/express/delivery/no_worry_return/unbind?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
}
|
||||
@ -110,7 +110,7 @@ class Logistics extends BasicWeChat
|
||||
*/
|
||||
public function getQuota($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/quota/get?access_token=ACCESS_TOKEN';
|
||||
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/path/get?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
@ -191,47 +191,4 @@ class Logistics extends BasicWeChat
|
||||
$url = 'https://api.weixin.qq.com/cgi-bin/express/delivery/path/update?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 绑定/解绑物流账号
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function bindAccount($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/account/bind?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有绑定的物流账号
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function getAllAccount($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/account/getall?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量获取运单数据
|
||||
* @param array $data
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function batchGetOrder($data)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/order/batchget?access_token=ACCESS_TOKEN';
|
||||
return $this->callPostApi($url, $data, true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,147 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace WePayV3;
|
||||
|
||||
use WePayV3\Contracts\BasicWePay;
|
||||
|
||||
/**
|
||||
* 普通商户消费者投诉2.0
|
||||
* @class Complaints
|
||||
* @package WePayV3
|
||||
*/
|
||||
class Complaints extends BasicWePay
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询投诉列表
|
||||
* @param int $offset 分页开始位置
|
||||
* @param int $limit 分页大小
|
||||
* @param String $begin_date 开始日期
|
||||
* @param String $end_date 结束日期
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function complaintList($offset, $limit, $begin_date, $end_date)
|
||||
{
|
||||
$mchId = $this->config['mch_id'];
|
||||
$pathinfo = "/v3/merchant-service/complaints-v2?limit={$limit}&offset={$offset}&begin_date={$begin_date}&end_date={$end_date}&complainted_mchid={$mchId}";
|
||||
return $this->doRequest('GET', $pathinfo, '', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询投诉详情
|
||||
* @param string $complaint_id 被投诉单号
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function complaintDetails($complaint_id)
|
||||
{
|
||||
$pathinfo = "/v3/merchant-service/complaints-v2/{$complaint_id}";
|
||||
return $this->doRequest('GET', $pathinfo, '', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询投诉协商历史
|
||||
* @param string $complaint_id 被投诉单号
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function negotiationHistory($complaint_id)
|
||||
{
|
||||
$pathinfo = "/v3/merchant-service/complaints-v2/{$complaint_id}/negotiation-historys";
|
||||
return $this->doRequest('GET', $pathinfo, '', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建投诉通知回调地址
|
||||
* @param string $url 回调通知地址
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function CreateComplaintsNotify($url)
|
||||
{
|
||||
return $this->doRequest('POST', '/v3/merchant-service/complaint-notifications', json_encode(['url' => $url], JSON_UNESCAPED_UNICODE), true);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询投诉通知回调地址
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function queryComplaintsNotify()
|
||||
{
|
||||
return $this->doRequest('GET', '/v3/merchant-service/complaint-notifications', '', true);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新投诉通知回调地址
|
||||
* @param string $url 回调通知地址
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function updateComplaintsNotify($url)
|
||||
{
|
||||
return $this->doRequest('PUT', '/v3/merchant-service/complaint-notifications', json_encode(['url' => $url], JSON_UNESCAPED_UNICODE), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除投诉通知回调地址
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function deleteComplaintsNotify()
|
||||
{
|
||||
return $this->doRequest('DELETE', '/v3/merchant-service/complaint-notifications', '', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复投诉
|
||||
* @param string $complaint_id 被投诉单号
|
||||
* @param array $content 回复内容
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function replyInfo($complaint_id, array $content)
|
||||
{
|
||||
$content['complainted_mchid'] = $this->config['mch_id'];
|
||||
$pathinfo = "/v3/merchant-service/complaints-v2/{$complaint_id}/response";
|
||||
return $this->doRequest('POST', $pathinfo, json_encode($content, JSON_UNESCAPED_UNICODE), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 反馈处理完成
|
||||
* @param string $complaint_id 被投诉单号
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function completeComplaints($complaint_id)
|
||||
{
|
||||
$mchId = $this->config['mch_id'];
|
||||
$pathinfo = "/v3/merchant-service/complaints-v2/{$complaint_id}/complete";
|
||||
return $this->doRequest('POST', $pathinfo, json_encode(['complainted_mchid' => $mchId], JSON_UNESCAPED_UNICODE), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 图片请求接口
|
||||
* @param string $pathinfo
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function downLoadImg($pathinfo)
|
||||
{
|
||||
return $this->doRequest('GET', $pathinfo, '', true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 图片上传接口
|
||||
* @param array $imginfo
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function uploadImg(array $imginfo)
|
||||
{
|
||||
return $this->doRequest('POST', '/v3/merchant-service/images/upload', json_encode($imginfo, JSON_UNESCAPED_UNICODE), true);
|
||||
}
|
||||
}
|
||||
@ -31,12 +31,13 @@ class ProfitSharing extends BasicWePay
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function create(array $options)
|
||||
public function create($options)
|
||||
{
|
||||
$options['appid'] = $this->config['appid'];
|
||||
return $this->doRequest('POST', '/v3/profitsharing/orders', json_encode($options, JSON_UNESCAPED_UNICODE), true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询分账结果
|
||||
* @param string $outOrderNo 商户分账单号
|
||||
@ -56,7 +57,7 @@ class ProfitSharing extends BasicWePay
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function unfreeze(array $options)
|
||||
public function unfreeze($options)
|
||||
{
|
||||
return $this->doRequest('POST', '/v3/profitsharing/orders/unfreeze', json_encode($options, JSON_UNESCAPED_UNICODE), true);
|
||||
}
|
||||
@ -77,15 +78,11 @@ class ProfitSharing extends BasicWePay
|
||||
* 添加分账接收方
|
||||
* @param array $options
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidDecryptException
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function addReceiver(array $options)
|
||||
public function addReceiver($options)
|
||||
{
|
||||
$options['appid'] = $this->config['appid'];
|
||||
if (isset($options['name'])) {
|
||||
$options['name'] = $this->rsaEncode($options['name']);
|
||||
}
|
||||
return $this->doRequest('POST', "/v3/profitsharing/receivers/add", json_encode($options, JSON_UNESCAPED_UNICODE), true);
|
||||
}
|
||||
|
||||
@ -95,21 +92,9 @@ class ProfitSharing extends BasicWePay
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function deleteReceiver(array $options)
|
||||
public function deleteReceiver($options)
|
||||
{
|
||||
$options['appid'] = $this->config['appid'];
|
||||
return $this->doRequest('POST', "/v3/profitsharing/receivers/delete", json_encode($options, JSON_UNESCAPED_UNICODE), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求分账回退
|
||||
* @param array $options
|
||||
* @return array
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
*/
|
||||
public function backspace(array $options)
|
||||
{
|
||||
$options['appid'] = $this->config['appid'];
|
||||
return $this->doRequest('POST', "/v3/profitsharing/return-orders", json_encode($options, JSON_UNESCAPED_UNICODE), true);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user