killbill-paypal-express 4.1.5 → 4.1.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: 8dc36b7724efd4b473e338fcceee7e3ea0d5bbaa
4
- data.tar.gz: e7bbff378a81f45c74e1d289d9d573ec6d9e87f2
3
+ metadata.gz: 0c56b36f1fd04db5756bbadd3a64ea7eac06e111
4
+ data.tar.gz: 2e42e9a3231f927b3450ccfe30c0477f094be7d2
5
5
  SHA512:
6
- metadata.gz: 2a9e587a52da1a8d0a752fb47934649f9be28f7a532a9a1ecc9925c90f0a85e006547ce345d058ec250c4a055c092bae3428521ef3aa38b038baf3eac2797b56
7
- data.tar.gz: 641a6f9b88cbee002bd99c4b9b5872b789395ef4a86e1a464ab3d904268d3d1ba1806e461c012790ce12bf5ab50022638a78ee842d623cadc0cd2803b7c16fd0
6
+ metadata.gz: 2cc2e615c35a73c63b86ede5736b25fe0894f3d4853673f68daa9e79c8a7e6af3ad0fffb86c9ffb400ef46baf0eb8a50674c15fab193038d7d7193ea04147241
7
+ data.tar.gz: 8df90f1dfd4fcc4dbe0c6ee9ea6ed64668993a25f2e75c39e049aa9f167a64a58539122883e523cbe873741ec886efff6d73b8659fa02964ec6de108c3d6ca44
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- killbill-paypal-express (4.1.5)
4
+ killbill-paypal-express (4.1.6)
5
5
  actionpack (~> 4.1.0)
6
6
  actionview (~> 4.1.0)
7
7
  activemerchant (~> 1.53.0)
data/NEWS CHANGED
@@ -1,3 +1,6 @@
1
+ 4.1.6
2
+ Add invoice_id in refund call
3
+
1
4
  4.1.5
2
5
  Add more options to the build_form_descriptor call
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.1.5
1
+ 4.1.6
@@ -13,6 +13,26 @@ module ActiveMerchant #:nodoc:
13
13
  def successful?(response)
14
14
  response[:error_codes] == DUPLICATE_REQUEST_CODE ? false : original_successful?(response)
15
15
  end
16
+
17
+ # Note: ActiveMerchant is missing InvoiceID in RefundTransactionReq.
18
+ # See https://github.com/activemerchant/active_merchant/blob/v1.48.0/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb#L314
19
+ def build_refund_request(money, identification, options)
20
+ xml = Builder::XmlMarkup.new
21
+
22
+ xml.tag! 'RefundTransactionReq', 'xmlns' => PAYPAL_NAMESPACE do
23
+ xml.tag! 'RefundTransactionRequest', 'xmlns:n2' => EBAY_NAMESPACE do
24
+ xml.tag! 'n2:Version', API_VERSION
25
+ xml.tag! 'TransactionID', identification
26
+ xml.tag! 'Amount', amount(money), 'currencyID' => (options[:currency] || currency(money)) if money.present?
27
+ xml.tag! 'RefundType', (options[:refund_type] || (money.present? ? 'Partial' : 'Full'))
28
+ xml.tag! 'Memo', options[:note] unless options[:note].blank?
29
+ xml.tag! 'InvoiceID', (options[:order_id] || options[:invoice_id]) unless (options[:order_id] || options[:invoice_id]).blank?
30
+ end
31
+ end
32
+
33
+ xml.target!
34
+ end
35
+
16
36
  end
17
37
  end
18
38
  end
data/pom.xml CHANGED
@@ -26,7 +26,7 @@
26
26
  <groupId>org.kill-bill.billing.plugin.ruby</groupId>
27
27
  <artifactId>paypal-express-plugin</artifactId>
28
28
  <packaging>pom</packaging>
29
- <version>4.1.5</version>
29
+ <version>4.1.6</version>
30
30
  <name>paypal-express-plugin</name>
31
31
  <url>http://github.com/killbill/killbill-paypal-express-plugin</url>
32
32
  <description>Plugin for accessing Paypal Express Checkout as a payment gateway</description>
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: 4.1.5
4
+ version: 4.1.6
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: 2016-06-14 00:00:00.000000000 Z
11
+ date: 2016-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: killbill