Skip to content

Commit

Permalink
Payment: add support for cancel_url
Browse files Browse the repository at this point in the history
Closes GH-160
  • Loading branch information
justincase committed Jan 29, 2023
1 parent 9db60b3 commit f0a47d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/mollie/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class Payment < Base
:_links,
:details,
:redirect_url,
:cancel_url,
:webhook_url

alias links _links
Expand Down
4 changes: 3 additions & 1 deletion test/mollie/payment_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def test_setting_attributes
profile_id: 'pfl_QkEhN94Ba',
sequence_type: 'oneoff',
redirect_url: 'https://webshop.example.org/order/12345',
cancel_url: 'https://webshop.example.org/payments/cancel',
webhook_url: 'https://webshop.example.org/payments/webhook',
_links: {
'self' => {
Expand Down Expand Up @@ -72,8 +73,9 @@ def test_setting_attributes
assert_equal 'nl_NL', payment.locale
assert_equal 'NL', payment.country_code
assert_equal 'pfl_QkEhN94Ba', payment.profile_id
assert_equal 'https://webshop.example.org/payments/webhook', payment.webhook_url
assert_equal 'https://webshop.example.org/order/12345', payment.redirect_url
assert_equal 'https://webshop.example.org/payments/cancel', payment.cancel_url
assert_equal 'https://webshop.example.org/payments/webhook', payment.webhook_url
assert_equal 'https://www.mollie.com/payscreen/select-method/7UhSN1zuXS', payment.checkout_url
assert_equal false, payment.cancelable?
end
Expand Down

0 comments on commit f0a47d1

Please sign in to comment.