You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
charge = PinPayment::Charge.create(
customer: customer, # or you can pass customer.token, either way
email: customer.email,
amount: 1000,
currency: 'USD', # only AUD and USD are supported by pin.net.au
description: 'Widgets',
ip_address: request.remote_ip
)
if charge.success?
You would now store charge.token as a reference for this payment
end
Is there a way to return an error say "charge.errors" rather than raising an exception. With your example if the card returns an "Insaficiant funds" error it raises it as an exception. Would be awesome to have that as a return of charge.
Cheers. Ian
The text was updated successfully, but these errors were encountered:
With your example:
charge = PinPayment::Charge.create(
customer: customer, # or you can pass customer.token, either way
email: customer.email,
amount: 1000,
currency: 'USD', # only AUD and USD are supported by pin.net.au
description: 'Widgets',
ip_address: request.remote_ip
)
if charge.success?
You would now store charge.token as a reference for this payment
end
Is there a way to return an error say "charge.errors" rather than raising an exception. With your example if the card returns an "Insaficiant funds" error it raises it as an exception. Would be awesome to have that as a return of charge.
Cheers. Ian
The text was updated successfully, but these errors were encountered: