-
Notifications
You must be signed in to change notification settings - Fork 16
BDK Generate Receipt
This function will open a connection with the Bitcoin client, generate a label along with a checksum and then generate a new Bitcoin address with that label & checksum and return it to the developer for the dev to do what they wish with that information.
This function takes two parameters: amount_due_in_satoshi which is optional; As well as *product_id_array which is optional; and additional_information which is also optional;
amount_due_in_satoshi
- Type: Integer
product_id_array
- Type: Array
- Notes: Write an array of product or service ids that are in this order to be recalled later
additional_options
- Type: Array
- Notes: Write an array of additional details you like to store with the receipt.
This function outputs an array this array will output return_status, new_address, checksum.
return_status
- Type: Integer
-1 = Failure to generate reciept
1 = Success (Address generated)
100 = Failure to connect to Bitcoin client
101 = Address is too long or too short
102 = Failure to generate address
new_address
- Type: String
If return_status equals one (1) then this variable should contain a new valid Bitcoin address.
checksum
- Type: String
If return_status equals one (1) then this variables should contain the checksum to verify the necessary balance required to full-fill the receipt.