1

I am facing an issue regarding the bridge server.

I am trying to send payment using bridge server which is installed locally with version "bridge-v0.0.30-linux-amd64". And uses same program and bridge.cfg file from bridge documentation. But while running Java program I got the following error message:

{   
    "code": "missing_parameter",   
    "message": "Required parameter is missing.",   
    "data": {   
        "name": "amount"   
    } 
}

How to get proper output? Is anything is missing from .cfg file?

  • Can you post raw request you're sending to the bridge server? – Bartek Nowotarski Mar 23 '18 at 7:30
1

This information is not enough. What code are your trying to execute? Where is the stack trace of the error?

As I understand from the error description, you are trying to send some funds, but request parameters are invalid (specifically, parameter amount is missing).

Check this example of properly formed request:

var request = require('request');

request.post({
  url: 'http://localhost:8001/payment',
  form: {
    amount: '1',
    asset_code: 'USD',
    asset_issuer: 'GAIUIQNMSXTTR4TGZETSQCGBTIF32G2L5P4AML4LFTMTHKM44UHIN6XQ',
    destination: 'GCFXHS4GXL6BVUCXBWXGTITROWLVYXQKQLF4YH5O5JT3YZXCYPAFBJZB',
    source: 'SAV75E2NK7Q5JZZLBBBNUPCIAKABN64HNHMDLD62SZWM6EBJ4R7CUNTZ'
  }
}, function(error, response, body) {
  if (error || response.statusCode !== 200) {
    console.error('ERROR!', error || body);
  }
  else {
    console.log('SUCCESS!', body);
  }
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.