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

Sender should allow to retrieve payment status #32

Open
gip opened this issue Feb 5, 2016 · 0 comments
Open

Sender should allow to retrieve payment status #32

gip opened this issue Feb 5, 2016 · 0 comments

Comments

@gip
Copy link
Contributor

gip commented Feb 5, 2016

From the documentation (e.g. the README, see below), one can easily infer that when the callback is called the payment is successful. I don't think the current implementation enforces that -- tests showed that in some condition the payment didn't complete (source account amount was decreased by the payment amount + fee but the destination account wasn't updated -- the money was held in escrow). We should make sure this is clear and maybe the return value should be a promise with a payment status?

    send({
      sourceAccount:      'http://localhost:3001/accounts/alice',
      sourcePassword:     'alice',
      destinationAccount: 'http://localhost:3002/accounts/bob',
      destinationAmount:  '1',
      notary:             'http://localhost:6001',
      notaryPublicKey:    'QD/UBKyptEXcu6mZThsfnE/2ZZGsrpokKqaLMUrTUqo=',
      //receiptCondition: { message_hash, signer, public_key, type },
    }).then(function() {
      console.log('success')
    })
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