class OffsitePayments::Integrations::MollieMistercash::Notification
def acknowledge(authcode = nil)
def acknowledge(authcode = nil) @params = check_payment_status(transaction_id) true end
def api_key
def api_key @options[:credential1] end
def check_payment_status(transaction_id)
def check_payment_status(transaction_id) MollieMistercash.check_payment_status(@options[:credential1], transaction_id) end
def complete?
def complete? true end
def currency
def currency "EUR" end
def gross
def gross @params['amount'] end
def gross_cents
def gross_cents (BigDecimal.new(@params['amount'], 2) * 100).to_i end
def initialize(post_arguments, options = {})
def initialize(post_arguments, options = {}) super raise ArgumentError, "The transaction_id needs to be included in the query string." if transaction_id.nil? raise ArgumentError, "The credential1 option needs to be set to the Mollie API key." if api_key.blank? end
def item_id
def item_id params['metadata']['order'] end
def status
def status case @params['status'] when 'open'; 'Pending' when 'paidout', 'paid'; 'Completed' else 'Failed' end end
def test?
def test? @params['mode'] == 'test' end
def transaction_id
def transaction_id params['id'] end