killbill-paypal-express 5.0.8 → 5.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paypal_express/api.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eab4c199aba352c1a02eabd9f3b6a4709df3ce06
|
4
|
+
data.tar.gz: fe35eae96c5ceeafab668c82d6e4b680552eb541
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a62c822d00ed245d95495233aa5b5bbe46d581bec418328543967a989cbf47aade0de8a5a85e2dc6274a0b542048c81b497338e76bc52070c8caf08135bb6e65
|
7
|
+
data.tar.gz: c9562765d59370baababb0bf5c6a7c0861b8bb4a8896445844ad35e90aa87dbd3bacb66cf528432e5c43a2f55882778d139d9297e77b911252e9de24b07cdf9a
|
data/lib/paypal_express/api.rb
CHANGED
@@ -369,6 +369,10 @@ module Killbill #:nodoc:
|
|
369
369
|
else
|
370
370
|
options = {}
|
371
371
|
add_required_options(kb_payment_transaction_id, kb_payment_method_id, context, options)
|
372
|
+
options[:token] = ::Killbill::Plugin::ActiveMerchant::Utils.normalized(properties_hash, :token) || find_last_token(kb_account_id, context.tenant_id)
|
373
|
+
# Find the payment_processor_id if not provided
|
374
|
+
payment_processor_account_id ||= find_payment_processor_id_from_initial_call(kb_account_id, context.tenant_id, options[:token])
|
375
|
+
options[:payment_processor_account_id] = payment_processor_account_id
|
372
376
|
|
373
377
|
# We have a baid on file
|
374
378
|
if options[:reference_id]
|
@@ -385,8 +389,6 @@ module Killbill #:nodoc:
|
|
385
389
|
end
|
386
390
|
else
|
387
391
|
# One-off payment
|
388
|
-
options[:token] = ::Killbill::Plugin::ActiveMerchant::Utils.normalized(properties_hash, :token) || find_last_token(kb_account_id, context.tenant_id)
|
389
|
-
|
390
392
|
# Retrieve payer_id and payer_email
|
391
393
|
begin
|
392
394
|
payer_info = get_payer_info(options[:token],
|
@@ -429,10 +431,6 @@ module Killbill #:nodoc:
|
|
429
431
|
end
|
430
432
|
end
|
431
433
|
|
432
|
-
# Find the payment_processor_id if not provided
|
433
|
-
payment_processor_account_id ||= find_payment_processor_id_from_initial_call(kb_account_id, context.tenant_id, options[:token])
|
434
|
-
options[:payment_processor_account_id] = payment_processor_account_id
|
435
|
-
|
436
434
|
properties = merge_properties(properties, options)
|
437
435
|
dispatch_to_gateways(api_call_type, kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context, gateway_call_proc, nil, {:payer_id => options[:payer_id]})
|
438
436
|
end
|
@@ -562,6 +560,8 @@ module Killbill #:nodoc:
|
|
562
560
|
unknown_transactions_info = trx_plugin_info.find_all { |t_info_plugin| t_info_plugin.status == :UNDEFINED }
|
563
561
|
now = Time.parse(@clock.get_clock.get_utc_now.to_s)
|
564
562
|
|
563
|
+
return false if unknown_transactions_info.empty?
|
564
|
+
|
565
565
|
token = trx_plugin_info.map {|plugin_info| find_value_from_properties(plugin_info.properties, 'authorization')}.find {|token| !token.blank?}
|
566
566
|
if token.nil?
|
567
567
|
logger.warn("Unable to fix UNDEFINED kb_payment_id='#{payment_id}'. Unable to find its token.")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: killbill-paypal-express
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kill Bill core team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|