The class PtsV2PaymentsCapturesPost201ResponseOrderInformationInvoiceDetails has a property named Level3TransmissionStatus whose type is bool? but should be a string to match the json that is returned by the Cybersource API.
[DataMember(Name = "level3TransmissionStatus", EmitDefaultValue = false)] public bool? Level3TransmissionStatus { get; set; }
When running a Capture in the https://developer.cybersource.com website, you can see that the value returned is either a "Y" or an "N" for the "level3TransmissionStatus" property.
{
"_links": {
"void": {
"method": "POST",
"href": "/pts/v2/captures/6497833470526439704001/voids"
},
"self": {
"method": "GET",
"href": "/pts/v2/captures/6497833470526439704001"
}
},
"clientReferenceInformation": {
"code": "4695749-INV"
},
"id": "6497833470526439704001",
"orderInformation": {
"invoiceDetails": {
"level3TransmissionStatus": "Y"
},
"amountDetails": {
"totalAmount": "66.04",
"currency": "USD"
}
},
"reconciliationId": "78978558",
"status": "PENDING",
"submitTimeUtc": "2022-04-12T17:09:07Z"
}
This is why the SDK throws an exception when it tries to map the json to a PtsV2PaymentsCapturesPost201Response object.
Here is the exception raised when trying to process a capture
Could not convert string to boolean: Y. Path 'orderInformation.invoiceDetails.level3TransmissionStatus', line 1, position 315.