Module: XapoTools

Defined in:
lib/xapo_tools.rb

Defined Under Namespace

Classes: MicroPayment

Class Method Summary collapse

Class Method Details

.micro_payment_configObject

Micro payment button configuration options.

This function is intended to be a helper for creating empty micro payments buttons configuration but also serves for documenting. A hash with the intended fields would give the same results.

Attributes:

sender_user_id (str): The id of the user sending the payment.
sender_user_email (str, optional): The email of the user sending
    the payment.
sender_user_cellphone (str, optional): The celphone number of the user
    sending the payment.
receiver_user_id (str): The id of the user receiving the payment.
receiver_user_email (str): The email of the user receiving the payment.
pay_object_id (str): A payment identifier in the TPA context.
amount_BIT (float, optional): The amount of bitcoins to be payed by the
    widget. If not specified here, it must be entered on payment basis.
pay_type (str): The string representing the type of operation
    ("Tip", "Pay", "Deposit" or "Donate").


31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/xapo_tools.rb', line 31

def micro_payment_config
  return Hash[
              :sender_user_id => "", 
              :sender_user_email => "", 
              :sender_user_cellphone => "", 
              :receiver_user_id => "", 
              :receiver_user_email => "", 
              :pay_object_id => "", 
              :amount_BIT => 0, 
              :timestamp => XapoUtils.timestamp, 
              :pay_type => ""
            ]
end