class Bitkassa::PaymentResponse
A PaymentResponse
represents the immediate response after requesting a payment. It can will parse the JSON and contain the information nessecary to determine the status of the payment request.
Attributes
Refer to Initialize
for the description of all attributes.
Refer to Initialize
for the description of all attributes.
Refer to Initialize
for the description of all attributes.
Refer to Initialize
for the description of all attributes.
Refer to Initialize
for the description of all attributes.
Refer to Initialize
for the description of all attributes.
Refer to Initialize
for the description of all attributes.
Refer to Initialize
for the description of all attributes.
Public Class Methods
Generate a PaymentResponse
from a JSON payload.
# File lib/bitkassa/payment_response.rb, line 18 def self.from_json(json) new(JSON.parse(json)) end
Initialize a new payment response. Usually done by a PaymentRequest
.
Attributes:
-
payment_id
, Unique ID assigned to this payment byBitkassa
-
payment_url
, The Bitcoin payment URL which you can show (as link and/or QR) for the customer to pay from his wallet (if you’re hosting your own payment page) -
address
The Bitcoin address where the customer is supposed to send his payment. -
amount
, The amount in satoshis to be paid. -
expire
, Unix timestamp when the payment expires (typically 15 minutes after start) -
error
, Reason why the payment could not be initiated. Only set when payment errord. -
success
, Confirmation that the API call was processed successfull
# File lib/bitkassa/payment_response.rb, line 38 def initialize(attributes) attributes.each do |key, value| setter_method = "#{key}=".to_sym send(setter_method, value) end end