Merge pull request #5852 from beganovich/v5-2905-ach

(v5) Fixes for accepting ACH webhooks
This commit is contained in:
Benjamin Beganović 2021-05-29 13:00:30 +02:00 committed by GitHub
commit 51ae534b94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}