spree_alipay_payment 0.0.7 → 0.0.8
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca9b40823b6747fcab64559b4382401230c2b5b9
|
4
|
+
data.tar.gz: bc52074b4a8a30e91020c6ce5ae2ff7fd7c51da3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d3183af39b71c2128ce321f5d223955b1f37b4897ff08d1ab28a27b84f35df02f0bcaca5d3cb89bbfe4eef4b06656793c43c2950bc8f56b51a991ad8b13f862
|
7
|
+
data.tar.gz: 1d4aaaa30b0294fd0079b938e172ca0297862c2788a1f2b0a4c17f52aa4beffa52f78e36626b465d0b2ef04be6920978d5a74875c6e40ab9b532b09a65b56664
|
@@ -10,6 +10,7 @@ module Spree
|
|
10
10
|
# except :controller_name, :action_name, :host, etc.
|
11
11
|
# {"discount"=>"0.02", "logistics_type"=>"POST", "receive_zip"=>"999077", "payment_type"=>"1", "subject"=>"TalkGoal #R381807226", "logistics_fee"=>"0.03","trade_no"=>"2014111830597476", "buyer_email"=>"test@testing.com", "gmt_create"=>"2014-11-18 17:49:28", "notify_type"=>"trade_status_sync", "quantity"=>"1", "logistics_payment"=>"BUYER_PAY", "out_trade_no"=>"R381807226", "seller_id"=>"1111002381708888", "notify_time"=>"2014-11-18 17:49:52","trade_status"=>"WAIT_SELLER_SEND_GOODS", "is_total_fee_adjust"=>"N", "gmt_payment"=>"2014-11-18 17:49:52", "total_fee"=>"0.04", "seller_email"=>"seller@test.com", "price"=>"0.01", "buyer_id"=>"3333602021013333", "gmt_logistics_modify"=>"2014-11-18 17:49:40", "receive_phone"=>"999999999", "notify_id"=>"fe67a9a70e7372f11aa65985a556a11111", "receive_name"=>"Arthur CHAN", "use_coupon"=>"N", "sign_type"=>"MD5", "sign"=>"a9999ba0aac13a0ff511977b71b78888", "receive_address"=>"中国香港 九龍"}
|
12
12
|
notify_params = params.except(*request.path_parameters.keys)
|
13
|
+
notify_params.delete('commit')
|
13
14
|
logger.debug "notify alipayment params #{params.to_yaml}"
|
14
15
|
if Alipay::Notify.verify?(notify_params)
|
15
16
|
logger.debug " notify starting"
|
@@ -35,7 +36,7 @@ module Spree
|
|
35
36
|
# payment - The store is ready to receive the payment information for the order.
|
36
37
|
# confirm - The order is ready for a final review by the customer before being processed.
|
37
38
|
# complete
|
38
|
-
if notify_params[:trade_status] == 'WAIT_SELLER_SEND_GOODS'
|
39
|
+
if notify_params[:trade_status] == 'WAIT_SELLER_SEND_GOODS' || notify_params[:trade_status] == 'TRADE_FINISHED'
|
39
40
|
out_trade_no = notify_params[:out_trade_no]
|
40
41
|
payment = Spree::Payment.find_by_number(out_trade_no) || raise(ActiveRecord::RecordNotFound)
|
41
42
|
|