Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Provided Refund Address #58

Open
wtogami opened this issue Jul 2, 2014 · 2 comments
Open

User Provided Refund Address #58

wtogami opened this issue Jul 2, 2014 · 2 comments

Comments

@wtogami
Copy link
Collaborator

wtogami commented Jul 2, 2014

A Bitcoin transaction normally has no way of knowing where to send a refund. The invoice should let the user set a refund address once, but for security reasons they must not be able to change it thereafter.

invoice.refund can be set during invoice creation with options:

  • mandatory - invoice will only show the "Pay Now" button and thus reveal the payment address only after the refund address is set.
  • never - policy of this payment is to never allow refunds, by not asking for one it makes the payment process a bit smoother

In the mandatory case they can bypass the restriction if they use the API, but users are only hurting themselves.

The refund address can also be set by the Bitcoin client directly when a later version of Baron supports the payment protocol.

@wtogami
Copy link
Collaborator Author

wtogami commented Jul 15, 2014

If the user has javascript, can a tooltip pop-up when the Refund address text box has focus to inform the user that they may not change the address after it is set?

"Warning: You may not change the refund address after it is set. Please be certain that this address really does belong to you."

@wtogami
Copy link
Collaborator Author

wtogami commented Jul 15, 2014

      var bitcore = require('bitcore');
      var Address = bitcore.Address;
      var a = new Address('1KerhGhLn3SYBEQwby7VyVMWf16fXQUj5d');
      console.log('1KerhGhLn3SYBEQwby7VyVMWf16fXQUj5d is valid? '+a.isValid());

Address validation with this code was fixed in Bitcore v1.0.25, so be aware this requires an upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant