@@ -212,7 +212,7 @@ fn get_status(response_code: ForteResponseCode, action: ForteAction) -> enums::A
212
212
ForteResponseCode :: A01 => match action {
213
213
ForteAction :: Authorize => enums:: AttemptStatus :: Authorized ,
214
214
ForteAction :: Sale => enums:: AttemptStatus :: Pending ,
215
- ForteAction :: Verify => enums:: AttemptStatus :: Charged ,
215
+ ForteAction :: Verify | ForteAction :: Capture => enums:: AttemptStatus :: Charged ,
216
216
} ,
217
217
ForteResponseCode :: A05 | ForteResponseCode :: A06 => enums:: AttemptStatus :: Authorizing ,
218
218
_ => enums:: AttemptStatus :: Failure ,
@@ -221,10 +221,10 @@ fn get_status(response_code: ForteResponseCode, action: ForteAction) -> enums::A
221
221
222
222
#[ derive( Debug , Deserialize , Serialize ) ]
223
223
pub struct CardResponse {
224
- pub name_on_card : Secret < String > ,
224
+ pub name_on_card : Option < Secret < String > > ,
225
225
pub last_4_account_number : String ,
226
226
pub masked_account_number : String ,
227
- pub card_type : String ,
227
+ pub card_type : Option < String > ,
228
228
}
229
229
230
230
#[ derive( Debug , Deserialize , Serialize ) ]
@@ -266,6 +266,7 @@ pub enum ForteAction {
266
266
Sale ,
267
267
Authorize ,
268
268
Verify ,
269
+ Capture ,
269
270
}
270
271
271
272
#[ derive( Debug , Deserialize , Serialize ) ]
@@ -316,19 +317,33 @@ impl<F, T> TryFrom<ResponseRouterData<F, FortePaymentsResponse, T, PaymentsRespo
316
317
}
317
318
318
319
//PsyncResponse
319
-
320
320
#[ derive( Debug , Deserialize , Serialize ) ]
321
321
pub struct FortePaymentsSyncResponse {
322
322
pub transaction_id : String ,
323
+ pub organization_id : Secret < String > ,
323
324
pub location_id : Secret < String > ,
325
+ pub original_transaction_id : Option < String > ,
324
326
pub status : FortePaymentStatus ,
325
327
pub action : ForteAction ,
326
- pub authorization_amount : Option < FloatMajorUnit > ,
327
328
pub authorization_code : String ,
328
- pub entered_by : String ,
329
+ pub authorization_amount : Option < FloatMajorUnit > ,
329
330
pub billing_address : Option < BillingAddress > ,
331
+ pub entered_by : String ,
332
+ pub received_date : String ,
333
+ pub origination_date : Option < String > ,
330
334
pub card : Option < CardResponse > ,
335
+ pub attempt_number : i64 ,
331
336
pub response : ResponseStatus ,
337
+ pub links : ForteLink ,
338
+ pub biller_name : Option < String > ,
339
+ }
340
+
341
+ #[ derive( Debug , Deserialize , Serialize ) ]
342
+ pub struct ForteLink {
343
+ pub disputes : String ,
344
+ pub settlements : String ,
345
+ #[ serde( rename = "self" ) ]
346
+ pub self_url : String ,
332
347
}
333
348
334
349
impl < F , T > TryFrom < ResponseRouterData < F , FortePaymentsSyncResponse , T , PaymentsResponseData > >
0 commit comments