add Payment#purchase tests

This commit is contained in:
Rishabh Saxena 2016-08-09 02:29:44 +05:30
parent 4b0a5b1125
commit 5c21d1c4d9
5 changed files with 67 additions and 1 deletions

View file

@ -27,6 +27,7 @@ class Payment < ActiveRecord::Base
amount: amount_to_pay,
currency: conference.tickets.first.price_currency
self.amount = gateway_response[:amount]
self.last4 = gateway_response[:source][:last4]
self.authorization_code = gateway_response[:id]
self.status = 'success'