mirror of
https://gitee.com/zoujingli/WeChatDeveloper.git
synced 2026-07-08 14:21:07 +08:00
Compare commits
4 Commits
f5123f899e
...
5130bac7c5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5130bac7c5 | ||
|
|
59c4144f1f | ||
|
|
649bda174c | ||
|
|
2708e8d94a |
1
We.php
1
We.php
@ -86,6 +86,7 @@ use WeChat\Exceptions\InvalidInstanceException;
|
||||
* @method \WePay\Redpack WePayRedpack($options = []) static 微信红包支持
|
||||
* @method \WePay\Transfers WePayTransfers($options = []) static 微信商户打款到零钱
|
||||
* @method \WePay\TransfersBank WePayTransfersBank($options = []) static 微信商户打款到银行卡
|
||||
* @method \WePay\ProfitSharing WePayProfitSharing($options = []) static 微信分账
|
||||
*/
|
||||
class We
|
||||
{
|
||||
|
||||
@ -57,6 +57,7 @@ class Media extends BasicWeChat
|
||||
{
|
||||
$url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id={$media_id}";
|
||||
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||
if($outType=='url') return $url;
|
||||
$result = Tools::get($url);
|
||||
if (is_array($json = json_decode($result, true))) {
|
||||
if (!$this->isTry && isset($json['errcode']) && in_array($json['errcode'], ['40014', '40001', '41001', '42001'])) {
|
||||
@ -144,6 +145,7 @@ class Media extends BasicWeChat
|
||||
{
|
||||
$url = "https://api.weixin.qq.com/cgi-bin/material/get_material?access_token=ACCESS_TOKEN";
|
||||
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||
if($outType=='url') return $url;
|
||||
$result = Tools::post($url, ['media_id' => $media_id]);
|
||||
if (is_array($json = json_decode($result, true))) {
|
||||
if (!$this->isTry && isset($json['errcode']) && in_array($json['errcode'], ['40014', '40001', '41001', '42001'])) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user