Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Sync fork with upstream #6

Open
wants to merge 138 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
7d9509b
Revert "Switching depositflag to 0"
andrewpaliga Jul 22, 2015
9901ec1
Merge pull request #160 from activemerchant/revert-157-hitrust_deposi…
andrewpaliga Jul 27, 2015
2982dd6
Unit test for MOLPay
frankiecmk Jul 30, 2015
79a6376
Update molpay.rb
frankiecmk Jul 30, 2015
a01f2d7
Update molpay.rb
frankiecmk Jul 31, 2015
4666a18
Update molpay.rb
frankiecmk Jul 31, 2015
1bdb2ec
Merge pull request #164 from frankiecmk/patch-5
andrewpaliga Aug 6, 2015
ed0a5f0
make VendorTxCode unique
andrewpaliga Aug 20, 2015
b0ba8e5
Merge pull request #165 from activemerchant/unique_transaction_sage
andrewpaliga Aug 27, 2015
5b4f9f3
Update molpay.rb
frankiecmk Sep 23, 2015
03dfaac
Merge pull request #169 from frankiecmk/patch-6
andrewpaliga Sep 23, 2015
ab81c12
Revert "Make VendorTxCode unique"
andrewpaliga Oct 5, 2015
2bfe101
Merge pull request #173 from activemerchant/revert-165-unique_transac…
andrewpaliga Oct 6, 2015
7cb0668
Bump active_utils dependency
lucasuyezu Oct 14, 2015
ecece42
Merge pull request #175 from lucasuyezu/bump_active_utils
girasquid Oct 14, 2015
ce579cb
Allow Rails 5
rafaelfranca Nov 2, 2015
f94fb77
Remove unneeded require
rafaelfranca Nov 19, 2015
30c8381
Remove dead code
rafaelfranca Nov 19, 2015
12c156a
Test with Rails 5
rafaelfranca Nov 19, 2015
588abe1
Merge pull request #177 from rafaelfranca/rails5
girasquid Nov 19, 2015
c556c96
Catch nil params in Coinbase
ThereExistsX Nov 30, 2015
163270e
Molpay: Update to handle pending and unknown status
frankiecmk Nov 27, 2015
dd69422
Make VendorTxCode unique with truncated timestamp.
ThereExistsX Dec 10, 2015
e9be51c
Make VendorTxCode unique while preserving item_id for checkout
ThereExistsX Dec 16, 2015
2bf09b6
SagePayForm: Use valid delimiter in VendorTxCode
aprofeit Dec 16, 2015
0b298fe
App55: Remove Gateway
ThereExistsX Feb 23, 2016
f130b42
Send Billing Address for Universal Gateways
ThereExistsX Feb 4, 2016
9c30085
Remove Shipping and Taxes
ThereExistsX Feb 26, 2016
b99e63a
Stop testing ruby 1.9 on travis
aprofeit Apr 11, 2016
bb5e310
Merge pull request #197 from activemerchant/drop-ruby-19-support
Apr 11, 2016
988bcaa
Inject loop not returning hash on guard clauses.
ptolts Jun 22, 2016
41f39aa
Merge pull request #204 from ptolts/master
timbeiko Jun 27, 2016
693bdea
Checkout Finland integration
tuomasb Apr 17, 2016
0a58d2a
Remote test added
tuomasb Apr 25, 2016
c789635
Fixes and more information
tuomasb Apr 25, 2016
bb26fe5
More comments
tuomasb Apr 26, 2016
62a1f83
Moved remote test credentials to fixtures.yml
tuomasb Apr 26, 2016
69990b0
Update paydollar.rb
SimonLeungAPHK Jul 21, 2016
33cb50e
Merge pull request #206 from SimonLeungAPHK/patch-1
timbeiko Jul 25, 2016
16b5724
Allow Universal gateways to return with failure message
gauravmc Jul 26, 2016
913ad15
Merge pull request #208 from gauravmc/universal-message
Jul 26, 2016
24a9f92
Update paydollar.rb
SimonLeungAPHK Aug 8, 2016
e90298b
Merge pull request #210 from SimonLeungAPHK/patch-2
timbeiko Aug 8, 2016
7c870f1
Update Dutch banks for Mollie iDEAL
Nov 13, 2016
4a49f48
Fix CI by not overriding the version requirement for the money gem
Nov 18, 2016
6c6b0a2
Merge pull request #215 from bdewater/update-dutch-banks
andrewpaliga Nov 21, 2016
d7e1176
Return Money objects when calling #amount on subclasses of `OffsitePa…
Nov 21, 2016
71f6cdc
Merge pull request #217 from bdewater/fix-ci
bdewater Dec 2, 2016
9e3719f
Use SVG badges
bdewater Dec 2, 2016
bdeb0b2
Send digits only for phone field for PayU
Dec 12, 2016
59d08cc
Merge pull request #221 from nimzco/update_pay_u_integration
pi3r Dec 13, 2016
91e1083
removes minimum money dependency
Dec 13, 2016
c46c191
Merge pull request #222 from activemerchant/remove-minimum-money-depe…
pi3r Dec 14, 2016
30b4fbf
Swap gsub! for gsub for safety.
ptolts Jan 4, 2017
d73d7b8
Merge pull request #224 from ptolts/dont-modify-in-place
bdewater Jan 6, 2017
d1a2ee7
Submit Gateway
Nov 28, 2016
4ed8f4b
Merge pull request #219 from RavindraMalviaya/master
gauravmc Jan 9, 2017
4b9c1ea
Only test supported versions of Ruby on Travis
bdewater Jan 6, 2017
243a161
Merge pull request #225 from activemerchant/travis-rubies
bdewater Jan 9, 2017
8f1fd42
Update paydollar.rb
SimonLeungAPHK Feb 21, 2017
886fa2c
fix to_f rounding error
elfassy Feb 28, 2017
ba559f5
get correct version of bundler in CI for older tests
elfassy Mar 1, 2017
64ef1ac
Merge pull request #227 from activemerchant/realex_decimal_error
elfassy Mar 6, 2017
670bdb8
[Realex] guard against nil address when extracting AVS code
bizla Jan 9, 2017
116a293
bump active_utils version
elfassy Mar 22, 2017
015373c
Update paydollar.rb
SimonLeungAPHK Mar 24, 2017
7faccdc
Merge pull request #232 from activemerchant/bump_active_utils
elfassy Mar 24, 2017
bfcabd5
update payu_in.rb
AhamedWahid Mar 27, 2017
22d236c
fixed test cases
AhamedWahid Mar 30, 2017
47b032b
fixed test to support zipcode instead of zip
AhamedWahid Mar 30, 2017
72f07e1
Merge pull request #233 from AhamedWahid/patch-1
pi3r Apr 3, 2017
f4e5de8
only sign fields that starts with `x_`
Apr 3, 2017
d59cf3e
Merge pull request #226 from activemerchant/realex_nil_guard_avs_extract
bdewater Apr 11, 2017
13d6eda
Merge pull request #236 from activemerchant/only-sign-fields-that-sta…
pi3r Apr 12, 2017
01a58ad
update test url
SimonLeungAPHK Apr 13, 2017
847dfeb
[Citrus] compare Money object in Notification#amount_ok?
Apr 13, 2017
6ca5732
release version 2.3.0
aprofeit Feb 8, 2016
666cb55
release version 2.4.0
elfassy Mar 7, 2017
c15ac90
release version 2.5.0
elfassy Apr 17, 2017
e601246
Merge pull request #229 from activemerchant/bump_v2_4
elfassy Apr 17, 2017
597f6ec
Merge pull request #238 from activemerchant/compare-money-objects-in-…
pi3r Apr 19, 2017
f078cfa
Add binstubs Bundler creates for new gems to ease debugging
Apr 19, 2017
7039ced
Add Shopify gemfile for testing on Travis
Apr 13, 2017
6d82455
Use `Money.from_amount` in tests to ensure consistency between betwee…
Apr 19, 2017
97572dc
Merge pull request #239 from bdewater/money-travis
bdewater May 2, 2017
8c365a4
Merge pull request #228 from SimonLeungAPHK/patch-3
elfassy May 4, 2017
cc772fd
loosen actionpack and activesupport dependencies to 5.1
eitoball Apr 29, 2017
3e8c6c5
Constrain dependency according to Rails' shifted semver
shanecav84 May 15, 2017
85ed613
Remove stray curly bracket
edwinv Jun 7, 2017
186e6e6
Remove newline at end of file
edwinv Jun 7, 2017
eaf1116
Merge pull request #247 from edwinv/patch-1
bdewater Jun 8, 2017
1a12b8e
replace Money.new with Money.from_amount
elfassy Jun 6, 2017
232305b
Merge pull request #246 from activemerchant/money_from_amount
elfassy Jun 9, 2017
75e966c
Remove `rescue JSON::ParseError nil` pattern in BitPay integration (#…
bdewater Jun 22, 2017
b544e61
Do not include `locale` field for SagePay
Jul 17, 2017
15588bf
update Skrill API URL
sergey-alekseev Jul 21, 2017
7ffc0af
Merge pull request #258 from activemerchant/do-not-include-locale-for…
pi3r Aug 8, 2017
bd21383
Merge pull request #259 from sergey-alekseev/master
Krystosterone Aug 15, 2017
3b96b32
Merge pull request #245 from patientdev/patch-1
rafaelfranca Aug 22, 2017
c23ad00
Complete PayTM integration
Mohit-Aggarwal1 Jun 16, 2015
6d6eb90
Rails 4.0 does not have ActiveSupport secure string comparison
bdewater Aug 29, 2017
1ba5221
Update changelog for 2.6.0
bdewater Aug 29, 2017
954c227
Fix PayTM checksum generation (#262)
christianblais Sep 7, 2017
c1fc976
Release 2.6.1
bdewater Sep 7, 2017
60f157d
Fix discount BigDecimal initialization
aman-dureja Oct 30, 2017
b6a708e
Stub molpay tests
aman-dureja Oct 30, 2017
64705fb
Fix citrus_return_test
aman-dureja Oct 30, 2017
47c9e52
Merge pull request #264 from aman-dureja/bigdecimal-error-fix
bdewater Oct 30, 2017
29f5f31
Release 2.6.2
bdewater Oct 30, 2017
e7399a5
Account for original_discount = nil
aman-dureja Nov 7, 2017
eebe143
Merge pull request #265 from aman-dureja/bigdecimal-error-fix
bdewater Nov 7, 2017
af9d4de
Release 2.6.3
bdewater Nov 7, 2017
56f4209
Fix typo in changelog
bdewater Nov 7, 2017
a2c17e8
Use version of i18n >= 0.6.6
Dec 5, 2017
44b8cc4
Fix Mollie::API unit test
Dec 6, 2017
ef793cc
Merge pull request #267 from activemerchant/update-i18n
pi3r Dec 6, 2017
2bb89c5
[WorldPay] Removes concatenation of address lines
Jan 2, 2018
78ffb39
Merge pull request #270 from activemerchant/worldpay/remove-concat
bdewater Jan 8, 2018
8cd5552
Release 2.6.4
bdewater Jan 8, 2018
cc2dcf3
Copied MiGS classes from Active_merchant
chrisblatchley Jul 2, 2015
56e7c05
Update migs.rb
chrisblatchley Sep 15, 2015
bf693ce
Update migs.rb
chrisblatchley Sep 15, 2015
c4c3a65
Update migs.rb
chrisblatchley Sep 15, 2015
a8fd7e3
Fix more namespacing issues
chrisblatchley Sep 15, 2015
39399dd
Remove old api call for require option
chrisblatchley Sep 16, 2015
e6fba2a
Make sure year/month are padded properly
chrisblatchley Dec 9, 2015
d3b4fd0
Only multiply by 10 if given a float
chrisblatchley Mar 21, 2016
4495bb5
add a missing end
chrisblatchley Mar 21, 2016
4f119d6
Add method alias for success?
chrisblatchley Mar 22, 2016
b97072c
add comma
chrisblatchley Mar 22, 2016
4b6c3ba
Add method aliases for realex
chrisblatchley Mar 22, 2016
39ecde1
Switching from MD5 to SHA256
Nov 30, 2016
82ac3c8
Reverting last change due to processing error 400.
Nov 30, 2016
98ffdbd
Final solution for switching from MD5 to SHA256.
Nov 30, 2016
02e2da7
Use new Realex endpoints that have disabled TLS 1
Jun 22, 2017
dacc882
Adding network_merchants_offsite
Jul 5, 2017
2956d4f
Adding DiamondMind
Jul 12, 2017
1dae011
Removing unused code
Aug 5, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
language: ruby
script: "bundle exec rake test:units"
sudo: false
cache: bundler

rvm:
- "2.2"
- "2.1"
- "2.0"
- "1.9"
- 2.4.0
- 2.3.3
- 2.2.3
- 2.1

gemfile:
- Gemfile.rails32
- Gemfile.rails40
- Gemfile.rails41
- Gemfile.rails42
- Gemfile.rails50
- Gemfile.rails51

matrix:
exclude:
- rvm: 2.1
gemfile: Gemfile.rails50
- rvm: 2.1
gemfile: Gemfile.rails51
- rvm: 2.4.0
gemfile: Gemfile.rails32
- rvm: 2.4.0
gemfile: Gemfile.rails40
- rvm: 2.4.0
gemfile: Gemfile.rails41
- rvm: 2.4.0
gemfile: Gemfile.rails42
include:
- rvm: 2.3.3
gemfile: Gemfile.shopify

before_install:
- gem update bundler
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Offsite Payments CHANGELOG

### Version 2.6.4 (Jan 8, 2018)
- Use multiple address fields for WorldPay instead of concatenating them [joshnuss] #270

### Version 2.6.3 (Nov 7, 2017)
- Fix nil coercion to BigDecimal zero in PayuIn [aman-dureja] #265

### Version 2.6.2 (Oct 30, 2017)
- Fix ArgumentError in PayuIn with BigDecimal v1.3.2 [aman-dureja] #264
- Fix molpay and citrus tests [aman-dureja] #264

### Version 2.6.1 (Sep 7, 2017)
- Fix PayTM checksum generation [christianblais] #262

### Version 2.6.0 (Aug 29, 2017)
- Rails 5.1 compatibility [eitoball, patientdev] #245
- Update paydollar URLs [SimonLeungAPHK] #228
- Fixed compatibility between RubyMoney/money and Shopify/money gems [elfassy] #246
- Fixed calling Mollie with extra parameters [edwinv] #247
- Stop hiding JSON parse errors for Bitpay [bdewater] #251
- Do not send locale parameter to Sagepay [pi3r] #258
- Updats Skrill URL [sergey-alekseev ] #259
- Changed PayTM integration [Mohit-Aggarwal1] #260

### Version 2.5.0 (April 12, 2017)
- corrected zip parameter to from zip to zipcode
- [Realex] guard against nil when extracting AVS code
- only use fields that start with `x_` to generate the signature
- bump active_utils version 3.3.0

### Version 2.4.0 (March 7, 2017)
- Fixed use of decimal instead of float
- Fixed use Money gem
- Fixed sanitize of the phone field for payu_in
- Added Paytm
- Updated dependency on nokogiri 1.6

### Version 2.3.0 (February 8, 2016)
- Release 2.3.0

### Version 2.2.0 (October 14, 2015)
- Bump active_utils dependency. [lucasuyezu]

### Version 2.1.0 (January 16, 2015)

- **Change:** network exceptions now use ActiveUtils instead of ActiveMerchant as namespace,
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ source 'https://rubygems.org'
gemspec

gem 'jruby-openssl', :platforms => :jruby
gem 'money', '~> 5.0'

group :remote_test do
gem 'mechanize'
Expand Down
4 changes: 1 addition & 3 deletions Gemfile.rails32
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ source 'https://rubygems.org'
gemspec

gem 'jruby-openssl', :platforms => :jruby
gem 'money', '~> 5.0'

group :remote_test do
gem 'mechanize'
gem 'launchy'
gem 'mongrel', '1.2.0.pre2', :platforms => :ruby
end


gem 'rails', '~> 3.2.0'
gem 'actionpack', '~> 3.2.0'
4 changes: 1 addition & 3 deletions Gemfile.rails40
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ source 'https://rubygems.org'
gemspec

gem 'jruby-openssl', :platforms => :jruby
gem 'money', '~> 5.0'

group :remote_test do
gem 'mechanize'
gem 'launchy'
gem 'mongrel', '1.2.0.pre2', :platforms => :ruby
end


gem 'rails', '~> 4.0.0'
gem 'actionpack', '~> 4.0.0'
4 changes: 1 addition & 3 deletions Gemfile.rails41
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ source 'https://rubygems.org'
gemspec

gem 'jruby-openssl', :platforms => :jruby
gem 'money', '~> 5.0'

group :remote_test do
gem 'mechanize'
gem 'launchy'
gem 'mongrel', '1.2.0.pre2', :platforms => :ruby
end


gem 'rails', '~> 4.1.0'
gem 'actionpack', '~> 4.1.0'
3 changes: 1 addition & 2 deletions Gemfile.rails42
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ source 'https://rubygems.org'
gemspec

gem 'jruby-openssl', :platforms => :jruby
gem 'money', '~> 5.0'

group :remote_test do
gem 'mechanize'
gem 'launchy'
gem 'mongrel', '1.2.0.pre2', :platforms => :ruby
end

gem 'rails', '~> 4.2.0'
gem 'actionpack', '~> 4.2.0'
12 changes: 12 additions & 0 deletions Gemfile.rails50
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
source 'https://rubygems.org'
gemspec

gem 'jruby-openssl', :platforms => :jruby

group :remote_test do
gem 'mechanize'
gem 'launchy'
gem 'mongrel', '1.2.0.pre2', :platforms => :ruby
end

gem 'actionpack', '~> 5.0.0'
12 changes: 12 additions & 0 deletions Gemfile.rails51
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
source 'https://rubygems.org'
gemspec

gem 'jruby-openssl', :platforms => :jruby

group :remote_test do
gem 'mechanize'
gem 'launchy'
gem 'mongrel', '1.2.0.pre2', :platforms => :ruby
end

gem 'actionpack', '~> 5.1.0'
13 changes: 13 additions & 0 deletions Gemfile.shopify
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
source 'https://rubygems.org'
gemspec

gem 'jruby-openssl', :platforms => :jruby

group :remote_test do
gem 'mechanize'
gem 'launchy'
gem 'mongrel', '1.2.0.pre2', :platforms => :ruby
end

gem 'actionpack', '~> 5.0.0'
gem 'money', git: 'https://github.com/Shopify/money.git'
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Offsite Payments
[![Build Status](https://travis-ci.org/activemerchant/offsite_payments.png?branch=master)](https://travis-ci.org/activemerchant/offsite_payments)
[![Code Climate](https://codeclimate.com/github/activemerchant/offsite_payments.png)](https://codeclimate.com/github/activemerchant/offsite_payments)
[![Build Status](https://travis-ci.org/activemerchant/offsite_payments.svg?branch=master)](https://travis-ci.org/activemerchant/offsite_payments)
[![Code Climate](https://codeclimate.com/github/activemerchant/offsite_payments/badges/gpa.svg)](https://codeclimate.com/github/activemerchant/offsite_payments)

Offsite Payments is an extraction from the ecommerce system [Shopify](http://www.shopify.com). Shopify's requirements for a simple and unified API to handle dozens of different offsite payment pages (often called hosted payment pages) with very different exposed APIs was the chief principle in designing the library.

Expand Down
14 changes: 14 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env ruby

require "bundler/setup"
require "offsite_payments"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require "irb"
IRB.start(__FILE__)
8 changes: 8 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx

bundle install

# Do any other automated setup that you need to do here
2 changes: 1 addition & 1 deletion generators/templates/notification_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_accessors
end
def test_compositions
assert_equal Money.new(3166, 'USD'), @<%= identifier %>.amount
assert_equal Money.from_amount(31.66, 'USD'), @<%= identifier %>.amount
end

# Replace with real successful acknowledgement code
Expand Down
4 changes: 2 additions & 2 deletions lib/offsite_payments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
require 'cgi'
require "timeout"
require "socket"

require 'active_support/core_ext/class/delegating_attributes'
require 'bigdecimal'
require 'bigdecimal/util'

require 'active_utils'

Expand Down
2 changes: 1 addition & 1 deletion lib/offsite_payments/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def self.inherited(subclass)
end

def initialize(order, account, options = {})
options.assert_valid_keys([:amount, :currency, :test, :credential2, :credential3, :credential4, :country, :account_name, :description, :transaction_type, :authcode, :notify_url, :return_url, :redirect_param, :forward_url, :checkout_token, :deposit_flag])
options.assert_valid_keys([:amount, :currency, :test, :credential2, :credential3, :credential4, :country, :account_name, :description, :transaction_type, :authcode, :notify_url, :return_url, :redirect_param, :forward_url, :checkout_token])
@fields = {}
@raw_html_fields = []
@test = options[:test]
Expand Down
3 changes: 0 additions & 3 deletions lib/offsite_payments/integrations/bit_pay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ def transaction_id

def item_id
JSON.parse(params['posData'])['orderId']
rescue JSON::ParserError
end

def status
Expand Down Expand Up @@ -132,14 +131,12 @@ def acknowledge(authcode = nil)
retrieved_json = JSON.parse(@raw).tap { |j| j.delete('currentTime') }

posted_json == retrieved_json
rescue JSON::ParserError
end

private
def parse(body)
@raw = body
@params = JSON.parse(@raw)
rescue JSON::ParserError
end
end

Expand Down
Loading