==============微信服务器返回数据
return_code->SUCCESS
return_msg->发放成功
result_code->SUCCESS
err_code->SUCCESS
err_code_des->发放成功
mch_billno->【你的账户信息】
mch_id->【你的账户信息】
wxappid->【你的账户信息】
re_openid->【接收人openid】
total_amount->100
send_listid->10000417013001723769407
=================以下为红包操作
class View_Wechatpy_Redpack(View):def get(self,request):# 向个人用户发红包example#redpackclient=WeChatPay(appid=AppID,api_key= WX_MCH_KEY,mch_id=WX_MCH_ID,mch_cert=wx_cert_path,mch_key=wx_key_path,)req=client.redpack.send(user_id=u'o3h6juHSCuU8MubmKNBkpbYXYP1s',total_amount=100,send_name=u'转发的红包',act_name=u'分享没事发红包',wishing=u'这个红包很好玩',remark=u'好玩吧',total_num=1,client_ip=None,out_trade_no=None,scene_id=None,consume_mch_id=None,)return render(request,'logjson.html', {'req': req})class View_Wechatpy_Redpacklie(View):def get(self,request):# 向个人用户发裂变红包exampleclient=WeChatPay(appid=AppID,api_key= WX_MCH_KEY,mch_id=WX_MCH_ID,mch_cert=wx_cert_path,mch_key=wx_key_path,)req=client.redpack.send_group(user_id=u'o3h6juHSCuU8MubmKNBkpbYXYP1s',total_amount=150,send_name=u'你和好友都能领呦',act_name=u'裂变福利红包',wishing=u'关注万化工具领红包',remark=u'有点意思',total_num=5,client_ip=None,amt_type='ALL_RAND',out_trade_no=None,scene_id='PRODUCT_2',consume_mch_id=None,)return render(request,'logjson.html', {'req': req})
样例效果如下