wechat_payment 1.0.0 → 1.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: bf5c9c5546859b4b7429bede75ad056c5042121091257514caf1b66aa91f4b05
4
- data.tar.gz: 2d259a01e005dd91ce315a89ae9138c26dcab767151d39af0167c876d1cabae3
3
+ metadata.gz: 2100fe24861a1d75ca04e949abd877f1103264cb81d14d95a4f19b53063d34fc
4
+ data.tar.gz: 2350aab94044a8ad51625c078dc462a9bfa8905c1f2365b6b3c330ab003035ff
5
5
  SHA512:
6
- metadata.gz: 15742a17bffe3310201b9c20320ac96e7f19573c84a69002ed8b5852c0f5e6b423fc39610a26a048edee75f1cd6ad9fa5506719c84020bc89d85103029f2b47a
7
- data.tar.gz: f9decf10bd53c243d2e1e11b8bc0430599b288ba9db8c3fd6a7e35a5a93898014de23043a0d769947cd558c901680499492d95e3c0bb0b1a3f7a25023484e164
6
+ metadata.gz: ee743747eada08f87dd41e74e36b3032dc1230dedbb9c8cd0fb0a02369ff5afb596e5ec362f39f991602d34bb1e7920abb30277889c6c0687ab80c4388475b07
7
+ data.tar.gz: '094f7231dc3225b4d3c66b7f5bc596d3cf1a8c005230701afdee104a6c952e5e20341987ad483663d4405abf3271c934d9456b7a3ac2dd2528652b56149bbc5b'
data/README.md CHANGED
@@ -17,8 +17,8 @@
17
17
 
18
18
  3. 初始化
19
19
  ```bash
20
- # rails g wechat_payment:install [GoodsModel] [UserModel]
21
- $ rails g wechat_payment:install Product User
20
+ # rails g wechat_payment:install [GoodsModel] [UserGoodRelationModel] [UserModel]
21
+ $ rails g wechat_payment:install Product UserProduct User
22
22
  $ rails db:migrate
23
23
  ```
24
24
 
@@ -227,4 +227,4 @@ TODO 待补充
227
227
  Contribution directions go here.
228
228
 
229
229
  ## License
230
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
230
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,7 @@
1
+
2
+ class PaymentOrdersController < ApplicationController
3
+ def index
4
+
5
+ end
6
+
7
+ end
@@ -8,6 +8,10 @@ module WechatPayment
8
8
  before_create :gen_out_trade_no
9
9
  belongs_to :goods, polymorphic: true
10
10
 
11
+ scope :by_state, ->(state)do
12
+ where(state: state) if state.present?
13
+ end
14
+
11
15
  enum state: {
12
16
  paid: "paid",
13
17
  pending: "pending",
@@ -1,3 +1,3 @@
1
1
  module WechatPayment
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wechat_payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-15 00:00:00.000000000 Z
11
+ date: 2022-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -66,6 +66,7 @@ files:
66
66
  - app/assets/stylesheets/wechat_payment/application.css
67
67
  - app/controllers/wechat_payment/application_controller.rb
68
68
  - app/controllers/wechat_payment/callback_controller.rb
69
+ - app/controllers/wechat_payment/payment_orders_controller.rb
69
70
  - app/helpers/wechat_payment/application_helper.rb
70
71
  - app/jobs/wechat_payment/application_job.rb
71
72
  - app/mailers/wechat_payment/application_mailer.rb