mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 17:27:33 -04:00 
			
		
		
		
	Refactor Stripe init call
This commit is contained in:
		
							parent
							
								
									84ad529211
								
							
						
					
					
						commit
						0ff902d90f
					
				| @ -29,6 +29,8 @@ class SEPA | |||||||
|     public function __construct(StripePaymentDriver $stripe) |     public function __construct(StripePaymentDriver $stripe) | ||||||
|     { |     { | ||||||
|         $this->stripe = $stripe; |         $this->stripe = $stripe; | ||||||
|  | 
 | ||||||
|  |         $this->stripe->init(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public function authorizeView($data) |     public function authorizeView($data) | ||||||
| @ -73,7 +75,7 @@ class SEPA | |||||||
| 
 | 
 | ||||||
|         if (property_exists($gateway_response, 'status') && $gateway_response->status == 'processing') { |         if (property_exists($gateway_response, 'status') && $gateway_response->status == 'processing') { | ||||||
|              |              | ||||||
|             $this->stripe->init(); |      | ||||||
|             $this->storePaymentMethod($gateway_response); |             $this->storePaymentMethod($gateway_response); | ||||||
| 
 | 
 | ||||||
|             return $this->processSuccessfulPayment($gateway_response->id); |             return $this->processSuccessfulPayment($gateway_response->id); | ||||||
| @ -85,7 +87,7 @@ class SEPA | |||||||
| 
 | 
 | ||||||
|     public function processSuccessfulPayment(string $payment_intent) |     public function processSuccessfulPayment(string $payment_intent) | ||||||
|     { |     { | ||||||
|         $this->stripe->init(); | 
 | ||||||
| 
 | 
 | ||||||
|         $data = [ |         $data = [ | ||||||
|             'payment_method' => $payment_intent, |             'payment_method' => $payment_intent, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user