File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -449,7 +449,7 @@ where
449
449
headers. extend (
450
450
external_latency
451
451
. map ( |latency| vec ! [ ( X_HS_LATENCY . to_string( ) , latency. to_string( ) ) ] )
452
- . unwrap_or ( vec ! [ ] ) ,
452
+ . unwrap_or_default ( ) ,
453
453
) ;
454
454
}
455
455
let output = Ok ( match payment_request {
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ pub async fn verify_merchant_creds_for_applepay(
85
85
response. change_context ( api_error_response:: ApiErrorResponse :: InternalServerError ) ?;
86
86
87
87
// Error is already logged
88
- Ok ( match applepay_response {
88
+ match applepay_response {
89
89
Ok ( _) => {
90
90
utils:: check_existence_and_add_domain_to_db (
91
91
& state,
@@ -95,17 +95,20 @@ pub async fn verify_merchant_creds_for_applepay(
95
95
)
96
96
. await
97
97
. change_context ( api_error_response:: ApiErrorResponse :: InternalServerError ) ?;
98
- services:: api:: ApplicationResponse :: Json ( ApplepayMerchantResponse {
99
- status_message : "Applepay verification Completed" . to_string ( ) ,
100
- } )
98
+ Ok ( services:: api:: ApplicationResponse :: Json (
99
+ ApplepayMerchantResponse {
100
+ status_message : "Applepay verification Completed" . to_string ( ) ,
101
+ } ,
102
+ ) )
101
103
}
102
104
Err ( error) => {
103
105
logger:: error!( ?error) ;
104
- services:: api:: ApplicationResponse :: Json ( ApplepayMerchantResponse {
105
- status_message : "Applepay verification Failed" . to_string ( ) ,
106
- } )
106
+ Err ( api_error_response:: ApiErrorResponse :: InvalidRequestData {
107
+ message : "Applepay verification Failed" . to_string ( ) ,
108
+ }
109
+ . into ( ) )
107
110
}
108
- } )
111
+ }
109
112
}
110
113
111
114
pub async fn get_verified_apple_domains_with_mid_mca_id (
You can’t perform that action at this time.
0 commit comments