mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-31 15:42:03 -04:00
Enable Mollie webhooks
This commit is contained in:
parent
6141c48373
commit
ac8938eea9
@ -11,7 +11,8 @@ class MolliePaymentDriver extends BasePaymentDriver
|
|||||||
$data = parent::paymentDetails($paymentMethod);
|
$data = parent::paymentDetails($paymentMethod);
|
||||||
|
|
||||||
// Enable the webhooks
|
// Enable the webhooks
|
||||||
$data['notifyUrl'] = $data['returnUrl'];
|
//$data['notifyUrl'] = $data['returnUrl'];
|
||||||
|
$data['notifyUrl'] = url('/payment_hook/'. $this->account->account_key . '/' . GATEWAY_MOLLIE);
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
@ -24,6 +25,9 @@ class MolliePaymentDriver extends BasePaymentDriver
|
|||||||
|
|
||||||
$response = $this->gateway()->fetchTransaction($details)->send();
|
$response = $this->gateway()->fetchTransaction($details)->send();
|
||||||
|
|
||||||
|
\Log::info('completeOffsitePurchase');
|
||||||
|
\Log::info($response);
|
||||||
|
|
||||||
if ($response->isCancelled()) {
|
if ($response->isCancelled()) {
|
||||||
return false;
|
return false;
|
||||||
} elseif (! $response->isSuccessful()) {
|
} elseif (! $response->isSuccessful()) {
|
||||||
@ -32,4 +36,15 @@ class MolliePaymentDriver extends BasePaymentDriver
|
|||||||
|
|
||||||
return $this->createPayment($response->getTransactionReference());
|
return $this->createPayment($response->getTransactionReference());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function handleWebHook($input)
|
||||||
|
{
|
||||||
|
//$paymentId = array_get($input, 'id');
|
||||||
|
$response = $this->gateway()->fetchTransaction($input)->send();
|
||||||
|
|
||||||
|
\Log::info('handleWebHook');
|
||||||
|
\Log::info($response);
|
||||||
|
return 'Processed successfully';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ class UpdateDarkMode extends Migration
|
|||||||
$table->text('credit_number_pattern')->nullable();
|
$table->text('credit_number_pattern')->nullable();
|
||||||
});
|
});
|
||||||
|
|
||||||
DB::statement('update users set dark_mode = 1;');
|
DB::statement('update users set dark_mode = 1');
|
||||||
|
|
||||||
// update invoice_item_type_id for task invoice items
|
// update invoice_item_type_id for task invoice items
|
||||||
DB::statement('update invoice_items
|
DB::statement('update invoice_items
|
||||||
|
Loading…
x
Reference in New Issue
Block a user