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: d046e603db804cc73db069f9954409cf863d89bc
4
- data.tar.gz: 8fcea4d7ae626d98c2c84b7e7a97ec77b9c7465a
3
+ metadata.gz: ca9b40823b6747fcab64559b4382401230c2b5b9
4
+ data.tar.gz: bc52074b4a8a30e91020c6ce5ae2ff7fd7c51da3
5
5
  SHA512:
6
- metadata.gz: 768dab181f0663b5d2be69f5cbd826a4a9c368b9d115e826b963adae63b1ca648877d2068f2ab76f1d613a38564dd0855d7aa10e7b69cff0eb395a9085a8359e
7
- data.tar.gz: 09c4925e7c36e1f561033ca3e8d99d6dbd325d8a494f4e5bdcd2beb91fd7f300cc9282ff28ce981ad19edfd730747db7085486a8b5f65f27522acdb5bdd26ed1
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
 
@@ -1,3 +1,3 @@
1
1
  module SpreeAlipayPayment
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_alipay_payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - kevin obama