spree_alipay_payment 0.0.5 → 0.0.6

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: 62dd8cee4e31af1a62a1696c042c7e4f077c30e8
4
- data.tar.gz: ef6a1573b38d4f8d538b2ca277de2f65fcb254ed
3
+ metadata.gz: f620cf1e5be87bae2b4045320d85b6a125d81ab4
4
+ data.tar.gz: d434028122dc62e5f15961e69c2b9ac8a0512228
5
5
  SHA512:
6
- metadata.gz: cc4e8df49175a59a6111afd64b51c0815ef102b17d5d7b14f07a7cbe7456948573d36da0d5457a7dcdd8ce61cd18b6c083e4cee5dff23eb54599aab0fc4bee5d
7
- data.tar.gz: 7604e8ca746932a775224720f2397b1a9260dc383954c8a7ddc0356de903b7a5a6bd40f17b5461654240fc355e34787f415739eb94bcac5cb028e888ada595fd
6
+ metadata.gz: 339a707e46a519e337725270356df022e19cbf8abd8af8230ecd4651a1f31b4bef0f7e2d0966135b3158f2e4410fea70c8a723cbf20cf507b1d0d35ca8d16ac0
7
+ data.tar.gz: 71036805f23739eb44ff63ef75a490ce7317100a63e8118e8b6c93a9c14aa03bd2834c995e488fe30c483969b3e2b3ae5a62ebedad59a161e79f713285a9aeb0
@@ -2,6 +2,7 @@ module Spree
2
2
  class AlipayController < StoreController
3
3
 
4
4
  def partner_trade
5
+ logger.debug "go to alipayment #{params.to_yaml}"
5
6
  order = current_order || raise(ActiveRecord::RecordNotFound)
6
7
  order.line_items.each do |item|
7
8
  @product_name=item.variant.product.name
@@ -6,9 +6,9 @@ module Spree
6
6
  # except :controller_name, :action_name, :host, etc.
7
7
  # {"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"=>"中国香港 九龍"}
8
8
  notify_params = params.except(*request.path_parameters.keys)
9
-
9
+ logger.debug "notify alipayment params #{params.to_yaml}"
10
10
  if Alipay::Notify.verify?(notify_params)
11
- logger.info " notify starting"
11
+ logger.debug " notify starting"
12
12
  logger.info notify_params.inspect
13
13
 
14
14
  # Valid notify, code your business logic.
@@ -36,11 +36,12 @@ module Spree
36
36
  payment = Spree::Payment.find_by_number(out_trade_no) || raise(ActiveRecord::RecordNotFound)
37
37
 
38
38
  #payment.update_columns( :response_code => notify_params[:trade_no])
39
+ logger.debug " notify order is updating"
39
40
  payment.complete!
40
-
41
+ logger.debug " notify order ended"
41
42
  # o.next!
42
43
  payment.order.next!
43
- logger.info " notify end"
44
+ logger.debug " notify ended"
44
45
  end
45
46
  return render :text => 'success'
46
47
  end
@@ -1,3 +1,3 @@
1
1
  module SpreeAlipayPayment
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_alipay_payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - kevin obama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-04 00:00:00.000000000 Z
11
+ date: 2015-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core