mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	fix(api_request): make payment_method_data as optional (#4527)
				
					
				
			Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -335,7 +335,9 @@ impl TryFrom<StripePaymentIntentRequest> for payments::PaymentsRequest { | ||||
|                 pmd.payment_method_details | ||||
|                     .as_ref() | ||||
|                     .map(|spmd| payments::PaymentMethodDataRequest { | ||||
|                         payment_method_data: payments::PaymentMethodData::from(spmd.to_owned()), | ||||
|                         payment_method_data: Some(payments::PaymentMethodData::from( | ||||
|                             spmd.to_owned(), | ||||
|                         )), | ||||
|                         billing: pmd.billing_details.clone().map(payments::Address::from), | ||||
|                     }) | ||||
|             }), | ||||
|  | ||||
| @ -246,7 +246,9 @@ impl TryFrom<StripeSetupIntentRequest> for payments::PaymentsRequest { | ||||
|                 pmd.payment_method_details | ||||
|                     .as_ref() | ||||
|                     .map(|spmd| payments::PaymentMethodDataRequest { | ||||
|                         payment_method_data: payments::PaymentMethodData::from(spmd.to_owned()), | ||||
|                         payment_method_data: Some(payments::PaymentMethodData::from( | ||||
|                             spmd.to_owned(), | ||||
|                         )), | ||||
|                         billing: pmd.billing_details.clone().map(payments::Address::from), | ||||
|                     }) | ||||
|             }), | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Narayan Bhat
					Narayan Bhat