Use the API to get information about orderID #5758
Unanswered
julienheinen
asked this question in
Technical Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I have a few questions about using the api.
Here's the context: the user registers, hasn't paid and has no orderID. Then he's redirected to btcpayserver (another .onion address). He chooses his offer, proceeds to payment, and is returned to the original .onion address.
First, I tested a 0 euro offer. The invoices are created, but then the user is not redirected. And if he clicks on the return to shop button, he's not redirected to the original site. I even tried in RedirectURL google.fr, thinking it was because of the .onion .... no unfortunately the redirection doesn't work, in yes.
( maybe I'm wrong, maybe it's the invoice that's redirected after payment, but then if it's just how to redirect the user with a button for example to thanks.php)
Then, 1 problem arises. It involves retrieving information about the order. Indeed, to add verification, I need to create automation, which verifies that the user has paid. I've seen that 2 solutions are available to me.
The first can be used I think with callback notification url, it returns the json including the purchase and payment informatyions to an address, in php to retrieve the info.
Using greenfield API (which I prefer), but there's another problem. After going through the docs, I found out that you could use a GET invoice to receive payment information. Except that you need the invoice id, and the user making the payment doesn't have access to it, and what's more, I don't even have access to it.
So I can GET all the invoices. But there's no php script for that. Because if I could GET all the invoices, and filter by orderID. Jed would find the right invoice, and I could retrieve the information from it.
Thank you, if I've made any mistakes in the wording, please excuse me. I still need to improve my php skills
Beta Was this translation helpful? Give feedback.
All reactions