2

We are facing issue in BlockChain API - Make Payment.

When we are calling API with below-mentioned parameters we are getting an unexpected error.

URL Address: http://localhost:3000/merchant/SENDER_GUID/payment?password=SENDER_PASSWORD&api_code=MY_API_CODE&to=38ccq12hPFoiSksxUdr6SQ5VosyjY7s9AU&amount=100000

Our PHP code:

function makePayment(){
        $user = $this->checkUserId($this->input->post('user_id'));
        return json_decode(file_get_contents('http://localhost:3000/merchant/'.$user[0]->guid.'/payment?password='.$this->input->post('password').'&api_code='.API_CODE.'&to='.$this->input->post('to').'&amount='.$this->input->post('amount').'&from='.$user[0]->address.'&fee='.$this->input->post('fee')));
    }

NOTE: We have also tried with or without fee, from, api_code

Getting Response:

{"error":"**Unexpected error**, please try again"}

How can we resolve this issue? Are we getting this issue as we are working on localhost, should we need to make it live to resolve this?

halfer
  • 19,824
  • 17
  • 99
  • 186

0 Answers0