shopper – Bitpay take a look at account Java SDK integration: Inadequate steadiness error when paying bill – CoinNewsTrend

shopper – Bitpay take a look at account Java SDK integration: Inadequate steadiness error when paying bill


Downside
I arrange a Bitpay take a look at account and loaded my Bitpay pockets with testnet BTC. Nonetheless I am seeing an in an "Inadequate funds for charge" error when paying an bill with the Bitpay Java SDK. Double checked the BTC quantity in my pockets and it is lower than your entire complete (together with the charge) and even tried manually setting the miner charge to 0 from the Bill object.

Anticipated Conduct
Consumer shouldn’t obtain “Inadequate funds for charge” error when opening the URL generated by the Bill.

Code

// Config file
{
  "BitPayConfiguration" : 
    "Atmosphere" : "Check",
    "EnvConfig" : 
      "Check" : 
        "PrivateKeyPath" : "",
        "PrivateKey" : "xxx",
        "ApiTokens" : 
          "payout" : "yyy",
          "service provider" : "zzz"
        
      
    
  
}


// app code
    enjoyable createClient() 
        val configFilePath = ConfigFilePath("src/primary/assets/BitPay.config.json")
       bitpayClient = Consumer.createClientByConfigFilePath(configFilePath)
    


enjoyable createInvoice(bitpayClient: Consumer) 
    var bill = Bill(0.00002, Foreign money.BTC)
    bill.autoRedirect = true
    bill = bitpayClient.createInvoice(bill)
    bill.merchantName = null
    bill.minerFees.btc.satoshisPerByte = 0.0
    bill.minerFees.btc.totalFee = 0

    val outcome: Bill = bitpayClient.createInvoice(bill)

Balances and complete due

  • testnet BTC steadiness: 0.00033
  • complete due (BTC): 0.00017439

enter image description here



Supply hyperlink