Skip to content

Commit

Permalink
fix(qr_code): use JSON content type for simulation endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
nazieb committed Oct 19, 2022
1 parent 4bad9a4 commit 4ad15de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xendit-node",
"version": "1.21.6",
"version": "1.21.7",
"description": "NodeJS client for Xendit API",
"main": "index.js",
"types": "index.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion src/qr_code/qr_code.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ QrCode.prototype.simulate = function(data) {
`${this.API_ENDPOINT}/${data.externalID}/payments/simulate`,
{
method: 'POST',
headers: { Authorization: Auth.basicAuthHeader(this.opts.secretKey) },
headers: {
'Content-Type': 'application/json',
Authorization: Auth.basicAuthHeader(this.opts.secretKey),
},
body: JSON.stringify({ amount: data.amount }),
},
)
Expand Down

0 comments on commit 4ad15de

Please sign in to comment.