Skip to content

Commit

Permalink
added config folder and updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
boyaq committed Nov 11, 2016
1 parent bbbfa54 commit 96f744a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ node_modules
coverage
mochawesome-reports
real_tests
config
config/realWechat.json

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ let orderData = {
total_fee: 100,
spbill_create_ip: '192.168.2.1',
notify_url: 'http://wxpayment_notify_url',
trade_type: 'JSAPI',
product_id: '1234567890',
openid: 'xxxxxxxx'
trade_type: 'JSAPI'
};

wechatPaymentInstance.createUnifiedOrder(orderData)
Expand Down
9 changes: 9 additions & 0 deletions config/urls.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
UNIFIED_ORDER: 'https://api.mch.weixin.qq.com/pay/unifiedorder',
ORDER_QUERY: 'https://api.mch.weixin.qq.com/pay/orderquery',
CLOSE_ORDER: 'https://api.mch.weixin.qq.com/pay/closeorder',
REFUND: 'https://api.mch.weixin.qq.com/secapi/pay/refund',
REFUND_QUERY: 'https://api.mch.weixin.qq.com/pay/refundquery',
TRANSFERS: 'https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers',
TRNSFER_INFO: 'https://api.mch.weixin.qq.com/mmpaymkttransfers/gettransferinfo'
}
7 changes: 7 additions & 0 deletions config/wechat.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"partnerKey": "微信商户平台API密钥",
"appId": "微信APP id",
"mchId": "微信商户平台商户ID",
"notifyUrl": "/order/notify-from-wechat",
"tradeType": "APP/JSAPI/NATIVE"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wechat-payment-node",
"version": "1.0.0",
"version": "1.1.0",
"description": "Payment API of Weixin (WeChat)",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 96f744a

Please sign in to comment.