mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	fix: update payment with PM and PMD gives requires_payment_method instead of requires_confirmation (#446)
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							2c764a273e
						
					
				
				
					commit
					02ed4930da
				
			| @ -173,6 +173,17 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsRequest> for Pa | |||||||
|                 Box::new(self) |                 Box::new(self) | ||||||
|             }; |             }; | ||||||
|  |  | ||||||
|  |         payment_intent.status = match request.payment_method_data.as_ref() { | ||||||
|  |             Some(_) => { | ||||||
|  |                 if request.confirm.unwrap_or(false) { | ||||||
|  |                     payment_intent.status | ||||||
|  |                 } else { | ||||||
|  |                     enums::IntentStatus::RequiresConfirmation | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             None => enums::IntentStatus::RequiresPaymentMethod, | ||||||
|  |         }; | ||||||
|  |  | ||||||
|         match payment_intent.status { |         match payment_intent.status { | ||||||
|             enums::IntentStatus::Succeeded |             enums::IntentStatus::Succeeded | ||||||
|             | enums::IntentStatus::Failed |             | enums::IntentStatus::Failed | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user