mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for square autobill
This commit is contained in:
parent
55f71a27c7
commit
0694378bb5
@ -134,14 +134,8 @@ class SquareWebhook implements ShouldQueue
|
|||||||
|
|
||||||
nlog("Searching by payment hash");
|
nlog("Searching by payment hash");
|
||||||
|
|
||||||
$body = json_decode($apiResponse->getBody());
|
$payment_hash_id = $apiResponse->getResult()->getPayment()->getReferenceId() ?? false;
|
||||||
|
$square_payment = $apiResponse->getResult()->getPayment()->jsonSerialize();
|
||||||
$payment_hash_id = $body->payment->reference_id ?? false;
|
|
||||||
$square_payment = $body->payment ?? false;
|
|
||||||
|
|
||||||
if(!$payment_hash_id)
|
|
||||||
return;
|
|
||||||
|
|
||||||
$payment_hash = PaymentHash::query()->where('hash', $payment_hash_id)->firstOrFail();
|
$payment_hash = PaymentHash::query()->where('hash', $payment_hash_id)->firstOrFail();
|
||||||
|
|
||||||
$payment_hash->data = array_merge((array) $payment_hash->data, (array)$square_payment);
|
$payment_hash->data = array_merge((array) $payment_hash->data, (array)$square_payment);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user