Skip to content

Instantly share code, notes, and snippets.

@aonrobot
Last active October 15, 2021 05:01
Show Gist options
  • Save aonrobot/5ab09b676e9e25965e056dd98264ed66 to your computer and use it in GitHub Desktop.
Save aonrobot/5ab09b676e9e25965e056dd98264ed66 to your computer and use it in GitHub Desktop.
function callGetTransactionHistoryResult(account,gameId,agent,callback) {
let headers = {
'Content-Type': 'application/json',
'X-Ds-Signature' :CERT
};
let options = {
url: API_URL+'/v1/member/bet_history',
method: 'POST',
headers: headers,
json:{
"channel": CHANNEL,
"agent": agent,
"account": account.toLowerCase(),
"game_id":gameId,
"lang":"en_us"
}
};
console.log(options);
request(options, (error, response, body) => {
if (error) {
callback(error, null);
} else {
console.log(body);
callback(null,body);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment