wechat_payment 2.0.13 → 2.0.14
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 383f51dd9ca42a1ef6dd1231871e604fc7d985fba7990b5750759e698c5b9e8b
|
4
|
+
data.tar.gz: 4adbdbfbc709dc96cf6df6a038f721589fa7f11b7dfb8d744685b01bc16060b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90b55232826903f31a1aca89a4d67e620ff3a9ba73f62c7d53916f2da30b12fe3612827c5883974f8cec8a1c7bd6efad715988f3c732baa333f8c690985b32cd
|
7
|
+
data.tar.gz: aa71fc09c2d6fe3e8b0db85758c3a9aa4a42a0f1d38fa01691357171590b8608db3635b6240a224110f95830f512cd58a9307e71f9f0f8a49ff2820ef7151152
|
@@ -28,7 +28,7 @@ module WechatPayment
|
|
28
28
|
# 生成交易编号
|
29
29
|
def gen_out_trade_no
|
30
30
|
loop do
|
31
|
-
out_trade_no = "#{Time.current.to_i}#{SecureRandom.random_number(999_999_999)}"
|
31
|
+
out_trade_no = "#{WechatPayment.order_no_prefix}#{Time.current.to_i}#{SecureRandom.random_number(999_999_999)}"
|
32
32
|
records_count = WechatPayment::PaymentOrder.where(out_trade_no: out_trade_no).count
|
33
33
|
if records_count == 0
|
34
34
|
self.out_trade_no = out_trade_no
|
data/lib/wechat_payment.rb
CHANGED
@@ -5,7 +5,7 @@ module WechatPayment
|
|
5
5
|
|
6
6
|
class << self
|
7
7
|
attr_reader :apiclient_cert, :apiclient_key
|
8
|
-
attr_accessor :appid, :app_secret, :mch_id, :sub_appid, :sub_app_secret, :sub_mch_id, :key, :cert_path, :host
|
8
|
+
attr_accessor :appid, :app_secret, :mch_id, :sub_appid, :sub_app_secret, :sub_mch_id, :key, :cert_path, :host, :order_no_prefix
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.setup
|