examples/5-payments-history.rb in mollie-api-ruby-1.0.1 vs examples/5-payments-history.rb in mollie-api-ruby-1.1.0
- old
+ new
@@ -8,20 +8,20 @@
# Initialize the Mollie API library with your API key.
#
# See: https://www.mollie.nl/beheer/account/profielen/
#
mollie = Mollie::API::Client.new
- mollie.setApiKey "test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
+ mollie.setApiKey "test_bt7vvByF6jTcBR4dLuW66eNnHYNIJp"
#
# Get the all payments for this API key ordered by newest.
#
payments = mollie.payments.all
$response.body = "Your API key has #{payments.totalCount} payments, last #{payments.count}:<br>"
payments.each { |payment|
- $response.body << "€ #{payment.amount}, status: #{CGI.escapeHTML payment.status}<br>"
+ $response.body << "€ #{payment.amount}, status: #{CGI.escapeHTML payment.status} (#{CGI.escapeHTML payment.id})<br>"
}
rescue Mollie::API::Exception => e
$response.body << "API call failed: " << (CGI.escapeHTML e.message)
end