Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve language support for mollie #121

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion lib/offsite_payments/integrations/mollie_ideal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module MollieIdeal
]

def self.redirect_param_label
"Select your bank"
"Selecteer uw bank"
end

def self.redirect_param_options(options = {})
Expand Down
1 change: 1 addition & 0 deletions lib/offsite_payments/integrations/mollie_mistercash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def initialize(order, account, options = {})
:description => options[:description],
:redirectUrl => options[:return_url],
:method => 'mistercash',
:locale => 'nl_BE',
:metadata => { :order => order }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setup

def test_credential_based_url
@mock_api.expects(:post_request)
.with('payments', :amount => 500, :description => 'Order #111', :method => 'mistercash', :redirectUrl => 'https://return.com', :metadata => {:order => 'order-500'})
.with('payments', :amount => 500, :description => 'Order #111', :method => 'mistercash', :locale => 'nl_BE', :redirectUrl => 'https://return.com', :metadata => {:order => 'order-500'})
.returns(CREATE_PAYMENT_RESPONSE_JSON)

assert_equal Hash.new, @helper.fields
Expand All @@ -32,7 +32,7 @@ def test_credential_based_url

def test_credential_based_url_errors
@mock_api.expects(:post_request)
.with('payments', :amount => 500, :description => 'Order #111', :method => 'mistercash', :redirectUrl => 'https://return.com', :metadata => {:order => 'order-500'})
.with('payments', :amount => 500, :description => 'Order #111', :method => 'mistercash', :locale => 'nl_BE', :redirectUrl => 'https://return.com', :metadata => {:order => 'order-500'})
.raises(ActiveUtils::ResponseError.new(stub(:code => "403", :message => "Internal Server Error", :body => '{"error": {"message": "bleh"}}')))

assert_raises ActionViewHelperError do
Expand Down