@@ -269,61 +269,16 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
269
269
impl ConnectorIntegration < api:: Void , types:: PaymentsCancelData , types:: PaymentsResponseData >
270
270
for Mollie
271
271
{
272
- fn get_headers (
273
- & self ,
274
- req : & types:: PaymentsCancelRouterData ,
275
- connectors : & settings:: Connectors ,
276
- ) -> CustomResult < Vec < ( String , String ) > , errors:: ConnectorError > {
277
- self . build_headers ( req, connectors)
278
- }
279
-
280
- fn get_url (
281
- & self ,
282
- req : & types:: PaymentsCancelRouterData ,
283
- connectors : & settings:: Connectors ,
284
- ) -> CustomResult < String , errors:: ConnectorError > {
285
- Ok ( format ! (
286
- "{}payments/{}" ,
287
- self . base_url( connectors) ,
288
- req. request. connector_transaction_id
289
- ) )
290
- }
291
-
292
272
fn build_request (
293
273
& self ,
294
- req : & types:: PaymentsCancelRouterData ,
295
- connectors : & settings:: Connectors ,
274
+ _req : & types:: PaymentsCancelRouterData ,
275
+ _connectors : & settings:: Connectors ,
296
276
) -> CustomResult < Option < services:: Request > , errors:: ConnectorError > {
297
- Ok ( Some (
298
- services:: RequestBuilder :: new ( )
299
- . method ( services:: Method :: Delete )
300
- . url ( & types:: PaymentsVoidType :: get_url ( self , req, connectors) ?)
301
- . headers ( types:: PaymentsVoidType :: get_headers ( self , req, connectors) ?)
302
- . build ( ) ,
303
- ) )
304
- }
305
-
306
- fn handle_response (
307
- & self ,
308
- data : & types:: PaymentsCancelRouterData ,
309
- res : Response ,
310
- ) -> CustomResult < types:: PaymentsCancelRouterData , errors:: ConnectorError > {
311
- let response: mollie:: MolliePaymentsResponse = res
312
- . response
313
- . parse_struct ( "MolliePaymentsCancelResponse" )
314
- . change_context ( errors:: ConnectorError :: ResponseDeserializationFailed ) ?;
315
- types:: RouterData :: try_from ( types:: ResponseRouterData {
316
- response,
317
- data : data. clone ( ) ,
318
- http_code : res. status_code ,
277
+ Err ( errors:: ConnectorError :: FlowNotSupported {
278
+ flow : "Void" . to_string ( ) ,
279
+ connector : self . id ( ) . to_string ( ) ,
319
280
} )
320
- }
321
-
322
- fn get_error_response (
323
- & self ,
324
- res : Response ,
325
- ) -> CustomResult < ErrorResponse , errors:: ConnectorError > {
326
- self . build_error_response ( res)
281
+ . into_report ( )
327
282
}
328
283
}
329
284
0 commit comments