what's the value of dd('query' => 'amount>'.$transaction->amount.' AND metadata[\'email\']:\''.$transaction->user->email.'\'') ?
Apr 15, 2022
10
Level 41
Search try stripe transaction
Hi I need to search try my stripe transaction cording to email and amount according to the documentation on stripe https://stripe.com/docs/api/charges/search?lang=php my code is
$transactions = Transaction::with('user')->whereStatus('pending')->get();
foreach ($transactions as $transaction) {
$stripe = new StripeClient(
'sk_test_51ILwQcDTtGd18F0vf'
);
$stripe->charges->search([
'query' => 'amount>'.$transaction->amount.' AND metadata[\'email\']:\''.$transaction->user->email.'\'',
]);
dd($stripe);
}
getting this error
We were unable to parse your search query. Try using the format `metadata["key"]:"value"` to query for metadata or key:"value" to query for other fields.
Please or to participate in this conversation.