Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Post request url not found #2

Open
YassouSr opened this issue Dec 24, 2022 · 3 comments
Open

Post request url not found #2

YassouSr opened this issue Dec 24, 2022 · 3 comments

Comments

@YassouSr
Copy link

I am using django with react, and this is what shows me after executing create_payment function :
POST http://127.0.0.1:3000/baseURL/api/invoice 404 (Not Found)

How should i fix it ?

@Deas-Dose
Copy link

@YassouSr according to the this part of the docs, you should write the whole url like so: https://epay.chargily.com.dz/api/invoice, and send a POST request with a X-Authorization : API_KEY , Accept : application/json headers. it will depend on what are you really using to send the request (i suggest u use django for this to treat the server's response on the backend to validate the transaction or smth, and not from the frontend, or just use the frontend to confirm the transaction)

I know this is a bit late, but let it be for future generations xD

@abderrahmanebenhalima
Copy link

@YassouSr according to the this part of the docs, you should write the whole url like so: https://epay.chargily.com.dz/api/invoice, and send a POST request with a X-Authorization : API_KEY , Accept : application/json headers. it will depend on what are you really using to send the request (i suggest u use django for this to treat the server's response on the backend to validate the transaction or smth, and not from the frontend, or just use the frontend to confirm the transaction)

I know this is a bit late, but let it be for future generations xD

still not for react JS working TBH

@yaccine
Copy link

yaccine commented Jan 8, 2024

@YassouSr according to the this part of the docs, you should write the whole url like so: https://epay.chargily.com.dz/api/invoice, and send a POST request with a X-Authorization : API_KEY , Accept : application/json headers. it will depend on what are you really using to send the request (i suggest u use django for this to treat the server's response on the backend to validate the transaction or smth, and not from the frontend, or just use the frontend to confirm the transaction)

I know this is a bit late, but let it be for future generations xD

we have another isseu with cors error that comming from headers
Access to XMLHttpRequest at 'https://epay.chargily.com.dz/api/invoice' from origin 'http://localhost:3000' has been blocked by CORS policy: Request header field x-authorization is not allowed by Access-Control-Allow-Headers in preflight response.
التقاط

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants