Comments (2)
Hi @yogithesymbian I don't think the issue is coming from Midtrans library. From your log the error TypeError: Converting circular structure to JSON
is thrown by: node_modules/express/lib/response.js:1123:12
it is from Express library. Maybe your Express backend is unable to handle malformed HTTP response or something. Which you can check from your implementation of this line of code to know what function call produce the issue:
/src/controllers/notification.controller.js:55:26
apiClient.transaction.notification(notificationJson)
will work properly if the notificationJson
is a JSON object (or string) that have the correct attributes as example here: https://docs.midtrans.com/en/after-payment/http-notification?id=sample-for-various-payment-methods
From your example, the req.body
value is:
[{"statusResponse":"1"},{"transaction_time":"2","no":"3"},"yogi","as"]
Which is not a valid Midtrans notification JSON.
If you want to get a valid Midtrans notification JSON to test, I suggest you setup your Sandbox account to send HTTP notification to your backend: https://docs.midtrans.com/en/after-payment/http-notification?id=configuring-http-notifications-on-map
Then perform a sandbox test payment: https://docs.midtrans.com/en/technical-reference/sandbox-test
from midtrans-nodejs-client.
Hi @rizdaprasetya thanks in advance
i dunno why but i have test right now and its work .
last week i have tried with three value for the notificationJson variable
stringify(req.body); // notificationJson value
JSON.stringify({ ...req.body }); // notificationJson value
req.body; // notificationJson value // now its work dunno why how error is came on yesterday , i didnt touch anything .
from midtrans-nodejs-client.
Related Issues (20)
- Custom VA Number is not working HOT 4
- notificationJson Error not found HOT 2
- Bagaimana cara Midtrans Payment Gateway bisa berjalan diReact Js dengan backend laravel8 HOT 2
- callback pending run twice HOT 2
- Type for Typescript HOT 1
- Issue di Frontend, user tidak bisa input di SNAP UI Ketika Pembayaran Menggunakan Pilihan Kartu Kredit HOT 3
- Hapus bagian BACK TO MERCHANTS WEB HOT 3
- Tidak bisa menjalankan pembayaran snap ui menggunakan flutter webview 4.0.2 HOT 22
- ERROR in ./node_modules/midtrans-client/lib/httpClient.js 9:18-40 Module not found: Error: Can't resolve 'querystring' in 'C:\Users\[Username]\Documents\[Project-name]\node_modules\midtrans-client\lib' HOT 1
- Bagaimana cara melakukan callback midtrans setelah melakukan pembayaran. HOT 2
- "No MID/TID for this transaction" HOT 1
- Support for ejs import HOT 2
- Type on Typescript HOT 3
- IRIS API Access denied HOT 1
- midtrans register API HOT 1
- Cara melanjutkan transaksi HOT 2
- Finish redirect URL always goes to example.com HOT 2
- iOS 12 Error: snap.pay is not allowed to be called in this state
- Bagaimana cara mendapatkan seluruh data Transaction List pada dashboard Midtrans HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from midtrans-nodejs-client.