mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:57:33 -05:00 
			
		
		
		
	Fixes for mollie webhooks
This commit is contained in:
		
							parent
							
								
									7adaab984b
								
							
						
					
					
						commit
						ceab20b829
					
				@ -263,12 +263,13 @@ class BaseDriver extends AbstractPaymentDriver
 | 
			
		||||
 | 
			
		||||
        event('eloquent.created: App\Models\Payment', $payment);
 | 
			
		||||
 | 
			
		||||
        if ($this->client->getSetting('client_online_payment_notification'))
 | 
			
		||||
        if ($this->client->getSetting('client_online_payment_notification') && in_array($status, [Payment::STATUS_COMPLETED, Payment::STATUS_PENDING
 | 
			
		||||
        ]))
 | 
			
		||||
            $payment->service()->sendEmail();
 | 
			
		||||
 | 
			
		||||
        event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars()));
 | 
			
		||||
 | 
			
		||||
        if (property_exists($this->payment_hash->data, 'billing_context')) {
 | 
			
		||||
        if (property_exists($this->payment_hash->data, 'billing_context') && $status == Payment::STATUS_COMPLETED) {
 | 
			
		||||
            $billing_subscription = \App\Models\Subscription::find($this->payment_hash->data->billing_context->subscription_id);
 | 
			
		||||
 | 
			
		||||
            // To access campaign hash => $this->payment_hash->data->billing_context->campaign;
 | 
			
		||||
 | 
			
		||||
@ -324,7 +324,6 @@ class MolliePaymentDriver extends BaseDriver
 | 
			
		||||
                    /* Harvest Payment Hash*/
 | 
			
		||||
                    $payment_hash = PaymentHash::where('hash', $payment->metadata->hash)->first();
 | 
			
		||||
                    
 | 
			
		||||
 | 
			
		||||
                    $data = [
 | 
			
		||||
                        'gateway_type_id' => $payment->metadata->gateway_type_id,
 | 
			
		||||
                        'amount' => $amount = array_sum(array_column($payment_hash->invoices(), 'amount')) + $payment_hash->fee_total,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user