mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Minor adjustments for mollie payment driver
This commit is contained in:
parent
f6f9bccdb4
commit
762f6d4b2e
@ -27,8 +27,6 @@ class PaymentWebhookRequest extends Request
|
||||
|
||||
public function authorize()
|
||||
{
|
||||
MultiDB::findAndSetDbByCompanyKey($this->company_key);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -47,6 +45,8 @@ class PaymentWebhookRequest extends Request
|
||||
*/
|
||||
public function getCompanyGateway()
|
||||
{
|
||||
MultiDB::findAndSetDbByCompanyKey($this->company_key);
|
||||
|
||||
return CompanyGateway::withTrashed()->findOrFail($this->decodePrimaryKey($this->company_gateway_id));
|
||||
}
|
||||
|
||||
@ -59,6 +59,9 @@ class PaymentWebhookRequest extends Request
|
||||
public function getPaymentHash()
|
||||
{
|
||||
if ($this->query('hash')) {
|
||||
|
||||
MultiDB::findAndSetDbByCompanyKey($this->company_key);
|
||||
|
||||
return PaymentHash::where('hash', $this->query('hash'))->firstOrFail();
|
||||
}
|
||||
|
||||
@ -72,6 +75,8 @@ class PaymentWebhookRequest extends Request
|
||||
*/
|
||||
public function getCompany(): ?Company
|
||||
{
|
||||
MultiDB::findAndSetDbByCompanyKey($this->company_key);
|
||||
|
||||
return Company::where('company_key', $this->company_key)->firstOrFail();
|
||||
}
|
||||
}
|
||||
|
@ -304,6 +304,8 @@ class MolliePaymentDriver extends BaseDriver
|
||||
'paid' => Payment::STATUS_COMPLETED,
|
||||
];
|
||||
|
||||
nlog($request->id);
|
||||
|
||||
try {
|
||||
$payment = $this->gateway->payments->get($request->id);
|
||||
$record = Payment::withTrashed()->where('transaction_reference', $request->id)->first();
|
||||
|
Loading…
x
Reference in New Issue
Block a user