mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for webhook
This commit is contained in:
parent
dd1634a807
commit
b6197b5ed7
@ -752,7 +752,7 @@ class StripePaymentDriver extends BaseDriver
|
||||
if ($request->data['object']['status'] === "active"){
|
||||
// Check if payment method exists
|
||||
$clientgateway = ClientGatewayToken::query()
|
||||
->where('token', $request->data->payment_method)
|
||||
->where('token', $request->data['object']['payment_method'])
|
||||
->first();
|
||||
if ($clientgateway){
|
||||
$clientgateway->state = "authorized";
|
||||
@ -762,7 +762,7 @@ class StripePaymentDriver extends BaseDriver
|
||||
elseif ($request->data['object']['status'] === "inactive"){
|
||||
// Deactivate payment method
|
||||
$clientgateway = ClientGatewayToken::query()
|
||||
->where('token', $request->data->payment_method)
|
||||
->where('token', $request->data['object']['payment_method'])
|
||||
->first();
|
||||
$clientgateway->delete();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user