Skip to content

Commit

Permalink
Adds custom variable for dynamic return URL with WorldPay
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Wheeler committed Jun 21, 2013
1 parent 0e85307 commit bbeaf11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Helper < ActiveMerchant::Billing::Integrations::Helper

mapping :description, 'desc'
mapping :notify_url, 'MC_callback'
mapping :return_url, 'MC_return'


# WorldPay supports two different test modes - :always_succeed and :always_fail
Expand Down
6 changes: 6 additions & 0 deletions test/unit/integrations/helpers/world_pay_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,10 @@ def test_custom_params
assert_field 'M_custom_2', 'Custom Value 2'
assert_field 'MC_custom_3', 'Custom Value 3'
end

def test_return_url
@helper.return_url 'some_return_url'

assert_equal 'some_return_url', @helper.fields['MC_return']
end
end

0 comments on commit bbeaf11

Please sign in to comment.