mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 11:07:31 -04:00 
			
		
		
		
	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, |             '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( |         SystemLogger::dispatch( | ||||||
|             ['response' => $payment, 'data' => $data], |             ['response' => $payment, 'data' => $data], | ||||||
|  | |||||||
| @ -273,6 +273,9 @@ class MolliePaymentDriver extends BaseDriver | |||||||
| 
 | 
 | ||||||
|     public function processWebhookRequest(PaymentWebhookRequest $request) |     public function processWebhookRequest(PaymentWebhookRequest $request) | ||||||
|     { |     { | ||||||
|  |         // Allow app to catch up with webhook request.
 | ||||||
|  |         sleep(2); | ||||||
|  | 
 | ||||||
|         $validator = Validator::make($request->all(), [ |         $validator = Validator::make($request->all(), [ | ||||||
|             'id' => ['required', 'starts_with:tr'], |             'id' => ['required', 'starts_with:tr'], | ||||||
|         ]); |         ]); | ||||||
|  | |||||||
| @ -395,6 +395,9 @@ class StripePaymentDriver extends BaseDriver | |||||||
| 
 | 
 | ||||||
|     public function processWebhookRequest(PaymentWebhookRequest $request) |     public function processWebhookRequest(PaymentWebhookRequest $request) | ||||||
|     { |     { | ||||||
|  |         // Allow app to catch up with webhook request.
 | ||||||
|  |         sleep(2); | ||||||
|  | 
 | ||||||
|         if ($request->type === 'charge.succeeded' || $request->type === 'source.chargeable') { |         if ($request->type === 'charge.succeeded' || $request->type === 'source.chargeable') { | ||||||
|             foreach ($request->data as $transaction) { |             foreach ($request->data as $transaction) { | ||||||
|                 $payment = Payment::query() |                 $payment = Payment::query() | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user