Not sure why this is so difficcult.
I have an API endpoint on the server which accepts a POST method from 3rd party that is making a web-hook callback.
I can get the whole post string, but not the actual individual items.
public function index(Request $request) {
$data = $request->post(); // great shows all the key/value pairs
$request->input('invoice'); //nothing
$request->only('invoice'); // nothing
}
The actual (shortened) object looks like:
{"invoice=123456&amount1=1&amount2=0_01522¤cy1=USD&txn_id=CPDJ3BBCVJWGA9ULVHBHJLTY1Q"}
How can I get the actual individual keys as needed?
$request->invoice; // returns Trying to get property of non-object
$request['invoice']; // returns Undefined index: invoice
Simply lost at something seeming so simple.
Any help greatly appreciated