You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we call requestRefund, server returns exRates field "exRates":{"USD":882.03}} But InvoiceTransaction doesn't include this field and that's why it throws exception on mapping.
This happens if you get invoice with merchant facade. Second error which is related: If you send refund request with amount and currency and if the invoice is partially paid, server returns 500.
"message": "Error: do not specify amount or currency for refunds of partially paid invoices"
There is no way to refund partially paid invoice with current implementation.
I believe if you request a refund on a partially paid invoice you should NOT specify amount or currency. Rule is to refund 100% of partial paid invoices and only in BTC since tx did not hit merchant ledger.
@ajp8164 Exactly it's right what you say. But, there are 2 public methods for now and one is calling the other one. So api has just 1 method and it needs currency and amount. I have added logic inside of method to not break anything. But you can decide or implement another method requestPartial refund vs it's your choice :)
I want to implement a POC of bitcoin payment using Bitpay API. Please help me to implement this.
I m not getting anything from the client API code.
My mail id is [email protected] .
I m doing this for my client .If they approved it I will go with this solution only.
Your test account is not properly configured. Make sure to configure a settlement address. You can use the following testnet BTC address if you want: mkdb3xayMmpGaWG6fJWeA2LtbBmm3cNCjT
Hi Pieter,
I have created my test account but not able to get the test coin. Could you please help me out to get some test coin.
Thanks with Regadrs
Aniruddha
Activity
pieterpoorthuis commentedon Jan 17, 2017
I'll check and fix
MaDeRkAn commentedon Jan 17, 2017
This happens if you get invoice with merchant facade. Second error which is related: If you send refund request with amount and currency and if the invoice is partially paid, server returns 500.
"message": "Error: do not specify amount or currency for refunds of partially paid invoices"There is no way to refund partially paid invoice with current implementation.
MaDeRkAn commentedon Jan 18, 2017
Add
exratesfield toInvoiceTransactionAssign amount and currency only if invoice is fully paid.
I have added private method
isFullyPaidand changerequestRefundmethod.Here is the code:
ajp8164 commentedon Jan 19, 2017
I believe if you request a refund on a partially paid invoice you should NOT specify amount or currency. Rule is to refund 100% of partial paid invoices and only in BTC since tx did not hit merchant ledger.
MaDeRkAn commentedon Jan 20, 2017
@ajp8164 Exactly it's right what you say. But, there are 2 public methods for now and one is calling the other one. So api has just 1 method and it needs currency and amount. I have added logic inside of method to not break anything. But you can decide or implement another method requestPartial refund vs it's your choice :)
Fixed bitpay#20
Merge pull request #22 from pieterpoorthuis/master
pieterpoorthuis commentedon Feb 3, 2017
Reopened to also fix the refund request
ajp8164 commentedon May 17, 2017
Refund can't map exRates response
aniruddhamahato commentedon Mar 14, 2018
I want to implement a POC of bitcoin payment using Bitpay API. Please help me to implement this.
I m not getting anything from the client API code.
My mail id is [email protected] .
I m doing this for my client .If they approved it I will go with this solution only.
pieterpoorthuis commentedon Mar 14, 2018
Your test account is not properly configured. Make sure to configure a settlement address. You can use the following testnet BTC address if you want: mkdb3xayMmpGaWG6fJWeA2LtbBmm3cNCjT
More information about testing can be found here: https://bitpay.com/docs/testing
aniruddhamahato commentedon Mar 16, 2018
pieterpoorthuis commentedon Mar 21, 2018
Test BTC coins can be fetched from a testnet BTC faucet, like in https://testnet.coinfaucet.eu/en/
aniruddhamahato commentedon Mar 22, 2018
Fixed bitpay/java-bitpay-client#20
Merge pull request #22 from pieterpoorthuis/master