Merge pull request #6450 from beganovich/v5-626
(v5) Mollie improvements
This commit is contained in:
commit
b7f8485c53
|
|
@ -180,7 +180,7 @@ class CreditCard
|
|||
'transaction_reference' => $payment->id,
|
||||
];
|
||||
|
||||
$payment_record = $this->mollie->createPayment($data, Payment::STATUS_COMPLETED);
|
||||
$payment_record = $this->mollie->createPayment($data, $payment->status === 'paid' ? Payment::STATUS_COMPLETED : Payment::STATUS_PENDING);
|
||||
|
||||
SystemLogger::dispatch(
|
||||
['response' => $payment, 'data' => $data],
|
||||
|
|
|
|||
|
|
@ -273,6 +273,9 @@ class MolliePaymentDriver extends BaseDriver
|
|||
|
||||
public function processWebhookRequest(PaymentWebhookRequest $request)
|
||||
{
|
||||
// Allow app to catch up with webhook request.
|
||||
sleep(2);
|
||||
|
||||
$validator = Validator::make($request->all(), [
|
||||
'id' => ['required', 'starts_with:tr'],
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -395,6 +395,9 @@ class StripePaymentDriver extends BaseDriver
|
|||
|
||||
public function processWebhookRequest(PaymentWebhookRequest $request)
|
||||
{
|
||||
// Allow app to catch up with webhook request.
|
||||
sleep(2);
|
||||
|
||||
if ($request->type === 'charge.succeeded' || $request->type === 'source.chargeable') {
|
||||
foreach ($request->data as $transaction) {
|
||||
$payment = Payment::query()
|
||||
|
|
|
|||
Loading…
Reference in New Issue