@@ -1872,13 +1872,13 @@ pub struct PaypalPaymentConfirm {
1872
1872
#[ derive( Debug , Serialize , Deserialize ) ]
1873
1873
pub struct Paypal {
1874
1874
#[ serde( rename = "payerID" ) ]
1875
- payer_id : Secret < String > ,
1875
+ payer_id : Option < Secret < String > > ,
1876
1876
}
1877
1877
1878
1878
#[ derive( Debug , Serialize , Deserialize ) ]
1879
1879
pub struct PaypalQueryParams {
1880
1880
#[ serde( rename = "PayerID" ) ]
1881
- payer_id : Secret < String > ,
1881
+ payer_id : Option < Secret < String > > ,
1882
1882
}
1883
1883
1884
1884
impl TryFrom < & AuthorizedotnetRouterData < & types:: PaymentsCompleteAuthorizeRouterData > >
@@ -1895,10 +1895,13 @@ impl TryFrom<&AuthorizedotnetRouterData<&types::PaymentsCompleteAuthorizeRouterD
1895
1895
. as_ref ( )
1896
1896
. and_then ( |redirect_response| redirect_response. params . as_ref ( ) )
1897
1897
. ok_or ( errors:: ConnectorError :: ResponseDeserializationFailed ) ?;
1898
- let payer_id: Secret < String > =
1899
- serde_urlencoded:: from_str :: < PaypalQueryParams > ( params. peek ( ) )
1900
- . change_context ( errors:: ConnectorError :: ResponseDeserializationFailed ) ?
1901
- . payer_id ;
1898
+
1899
+ let query_params: PaypalQueryParams = serde_urlencoded:: from_str ( params. peek ( ) )
1900
+ . change_context ( errors:: ConnectorError :: ResponseDeserializationFailed )
1901
+ . attach_printable ( "Failed to parse connector response" ) ?;
1902
+
1903
+ let payer_id = query_params. payer_id ;
1904
+
1902
1905
let transaction_type = match item. router_data . request . capture_method {
1903
1906
Some ( enums:: CaptureMethod :: Manual ) => Ok ( TransactionType :: ContinueAuthorization ) ,
1904
1907
Some ( enums:: CaptureMethod :: SequentialAutomatic )
0 commit comments