Using the callback URL in a payment request - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Saturday, September 16, 2023

Using the callback URL in a payment request

I have a small concern, I use a mobile payment API, my problem is with the returned callback url, I have difficulty using it to allow me to make an insertion in the database.

this is what my payment request looks like

$response = Http::withHeaders([
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
])->withToken($token)->POST($api_url, [
  "merchant" => "DIN_CONCEPT",
  "type" => 1,
  "phone" => $telephone,
  "reference" => 'peimentMembre',
  "amount" => 100,
  "currency" => $currency,
  "callbackUrl" => $callback,
]);

My concern is how I can retrieve the request returned from this callback url to check the status of the transaction at the end of making an insertion into the database.



source https://stackoverflow.com/questions/77114228/using-the-callback-url-in-a-payment-request

No comments:

Post a Comment