mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 09:04:34 -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()
|
public function authorize()
|
||||||
{
|
{
|
||||||
MultiDB::findAndSetDbByCompanyKey($this->company_key);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,6 +45,8 @@ class PaymentWebhookRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function getCompanyGateway()
|
public function getCompanyGateway()
|
||||||
{
|
{
|
||||||
|
MultiDB::findAndSetDbByCompanyKey($this->company_key);
|
||||||
|
|
||||||
return CompanyGateway::withTrashed()->findOrFail($this->decodePrimaryKey($this->company_gateway_id));
|
return CompanyGateway::withTrashed()->findOrFail($this->decodePrimaryKey($this->company_gateway_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +59,9 @@ class PaymentWebhookRequest extends Request
|
|||||||
public function getPaymentHash()
|
public function getPaymentHash()
|
||||||
{
|
{
|
||||||
if ($this->query('hash')) {
|
if ($this->query('hash')) {
|
||||||
|
|
||||||
|
MultiDB::findAndSetDbByCompanyKey($this->company_key);
|
||||||
|
|
||||||
return PaymentHash::where('hash', $this->query('hash'))->firstOrFail();
|
return PaymentHash::where('hash', $this->query('hash'))->firstOrFail();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,6 +75,8 @@ class PaymentWebhookRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function getCompany(): ?Company
|
public function getCompany(): ?Company
|
||||||
{
|
{
|
||||||
|
MultiDB::findAndSetDbByCompanyKey($this->company_key);
|
||||||
|
|
||||||
return Company::where('company_key', $this->company_key)->firstOrFail();
|
return Company::where('company_key', $this->company_key)->firstOrFail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -304,6 +304,8 @@ class MolliePaymentDriver extends BaseDriver
|
|||||||
'paid' => Payment::STATUS_COMPLETED,
|
'paid' => Payment::STATUS_COMPLETED,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nlog($request->id);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$payment = $this->gateway->payments->get($request->id);
|
$payment = $this->gateway->payments->get($request->id);
|
||||||
$record = Payment::withTrashed()->where('transaction_reference', $request->id)->first();
|
$record = Payment::withTrashed()->where('transaction_reference', $request->id)->first();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user