@@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize};
7
7
use crate :: {
8
8
connector:: {
9
9
utils as connector_utils,
10
- utils:: { PaymentsAuthorizeRequestData , RouterData } ,
10
+ utils:: { CardData , PaymentsAuthorizeRequestData } ,
11
11
} ,
12
12
core:: errors,
13
13
types:: {
@@ -158,21 +158,15 @@ impl TryFrom<&DatatransRouterData<&types::PaymentsAuthorizeRouterData>>
158
158
fn try_from (
159
159
item : & DatatransRouterData < & types:: PaymentsAuthorizeRouterData > ,
160
160
) -> Result < Self , Self :: Error > {
161
- if item. router_data . is_three_ds ( ) {
162
- return Err ( errors:: ConnectorError :: NotImplemented (
163
- "Three_ds payments through Datatrans" . to_string ( ) ,
164
- )
165
- . into ( ) ) ;
166
- } ;
167
161
match item. router_data . request . payment_method_data . clone ( ) {
168
162
domain:: PaymentMethodData :: Card ( req_card) => Ok ( Self {
169
163
amount : item. amount ,
170
164
currency : item. router_data . request . currency ,
171
165
card : PlainCardDetails {
172
166
res_type : "PLAIN" . to_string ( ) ,
173
- number : req_card. card_number ,
174
- expiry_month : req_card. card_exp_month ,
175
- expiry_year : req_card. card_exp_year ,
167
+ number : req_card. card_number . clone ( ) ,
168
+ expiry_month : req_card. card_exp_month . clone ( ) ,
169
+ expiry_year : req_card. get_card_expiry_year_2_digit ( ) ? ,
176
170
} ,
177
171
refno : item. router_data . connector_request_reference_id . clone ( ) ,
178
172
auto_settle : matches ! (
0 commit comments