class Bitkassa::PaymentRequest

Make a PaymentRequest.

This will return the payment-response whith all returned information. A payment-request consists of a payload containing the information for the payment and an authentication message, being a signed version of the payload.

Attributes

amount[RW]
currency[RW]
description[RW]
meta_info[RW]
return_url[RW]
update_url[RW]

Public Instance Methods

attributes() click to toggle source

Attributes for the payload

  • attributes Hash:

** currency String required. “EUR” or “BTC” ** amount Integer required, amount to be paid in cents or satoshis ** description, ** return_url, ** update_url, ** meta_info

# File lib/bitkassa/payment_request.rb, line 26
def attributes
  {
    currency: @currency,
    amount: @amount,
    description: @description,
    return_url: @return_url,
    update_url: @update_url,
    meta_info: @meta_info
  }
end
can_perform?() click to toggle source

Override can_perform the require “currency” and “amount”

Calls superclass method
# File lib/bitkassa/payment_request.rb, line 39
def can_perform?
  return false if currency.nil?
  return false if amount.nil?
  super
end
payload_action() click to toggle source

Payload action is “start_payment”

# File lib/bitkassa/payment_request.rb, line 47
def payload_action
  "start_payment"
end