wechat_payment 1.0.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2100fe24861a1d75ca04e949abd877f1103264cb81d14d95a4f19b53063d34fc
4
- data.tar.gz: 2350aab94044a8ad51625c078dc462a9bfa8905c1f2365b6b3c330ab003035ff
3
+ metadata.gz: b44bb7536575ad7bc8160b621db67776152c256c0bfe9ef3ea3b5b538097385f
4
+ data.tar.gz: 6c5b38ea0075671aaabe84294ed3bacbfe2d7dbfeff5eb7f7dc05a53b8f8814a
5
5
  SHA512:
6
- metadata.gz: ee743747eada08f87dd41e74e36b3032dc1230dedbb9c8cd0fb0a02369ff5afb596e5ec362f39f991602d34bb1e7920abb30277889c6c0687ab80c4388475b07
7
- data.tar.gz: '094f7231dc3225b4d3c66b7f5bc596d3cf1a8c005230701afdee104a6c952e5e20341987ad483663d4405abf3271c934d9456b7a3ac2dd2528652b56149bbc5b'
6
+ metadata.gz: 56c0da01b6bc6d44076616ea80cad48deb6bd68372743aff0b5defccb0394edc4f0990f814d21c698e4d763fe2a0a4a14260da153685526e326a38e5bbc89786
7
+ data.tar.gz: cae818ffdb7fa29099a1d1565b2c8e29a76f1d019ad8bf097d75ee3992c8b01e54a9d80e66a45e8af9d04511eeb17fc1202279a18a56d5fe68df9d34e6964e27
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
  ## Convention
6
- 在使用该 Engine 之前,需要先建立`用户模型`,`商品模型`,`用户商品关联模型`,用户表需要有 open_id 字段,
6
+ 在使用该 Engine 之前,需要先建立`用户模型`,`商品模型`,`用户商品关联模型`,用户表需要有 openid 字段,
7
7
  商品表需要有 price 和 name 字段。假设`商品模型`为`Product`,则用户和商品之间的关联模型为`UserProduct`,
8
8
  关联模型属于`user`和`product`。
9
9
 
@@ -21,7 +21,7 @@ module WechatPayment
21
21
 
22
22
  # 将部分用户信息保存至订单
23
23
  def set_customer_info
24
- self.open_id = customer.open_id if open_id.blank?
24
+ self.openid = customer.openid if openid.blank?
25
25
  self.spbill_create_ip = customer.spbill_create_ip
26
26
  end
27
27
 
@@ -54,7 +54,7 @@ module WechatPayment
54
54
  spbill_create_ip: spbill_create_ip,
55
55
  total_fee: total_fee,
56
56
  body: body,
57
- openid: open_id
57
+ openid: openid
58
58
  }
59
59
  end
60
60
 
@@ -1,7 +1,7 @@
1
1
  class CreateWechatPaymentPaymentOrders < ActiveRecord::Migration[6.1]
2
2
  def change
3
3
  create_table :wechat_payment_payment_orders do |t|
4
- t.string :open_id
4
+ t.string :openid
5
5
  t.string :out_trade_no
6
6
  t.references :goods, polymorphic: true, null: false
7
7
  t.references :customer, polymorphic: true, null: false
@@ -17,6 +17,6 @@ class CreateWechatPaymentPaymentOrders < ActiveRecord::Migration[6.1]
17
17
 
18
18
  t.timestamps
19
19
  end
20
- add_index :wechat_payment_payment_orders, :open_id
20
+ add_index :wechat_payment_payment_orders, :openid
21
21
  end
22
22
  end
@@ -1,3 +1,3 @@
1
1
  module WechatPayment
2
- VERSION = '1.0.1'
2
+ VERSION = '2.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wechat_payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ian