Fixes for accepting ACH webhooks

This commit is contained in:
Benjamin Beganović 2021-05-29 12:57:39 +02:00
parent dd21c1f857
commit ec13e6dd14
2 changed files with 9 additions and 1 deletions

View File

@ -193,7 +193,8 @@ class ACH
SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_SUCCESS,
SystemLog::TYPE_STRIPE,
$this->stripe->client
$this->stripe->client,
$this->stripe->client->company,
);
return redirect()->route('client.payments.show', ['payment' => $this->stripe->encodePrimaryKey($payment->id)]);

View File

@ -390,6 +390,13 @@ class StripePaymentDriver extends BaseDriver
$payment->save();
}
if ($request->type == 'charge.succeeded') {
$payment->status_id = Payment::STATUS_COMPLETED;
$payment->save();
}
// charge.failed, charge.refunded
return response([], 200);
}