Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

originalLegalEntityId is not properly serialized on legalEntityResponse #4

Open
bdunn313 opened this issue Jan 7, 2020 · 2 comments

Comments

@bdunn313
Copy link

bdunn313 commented Jan 7, 2020

When creating a legalEntity and a 200 success is received with an originalLegalEntityId & originalLegalEntityStatus in the response instead of a legalEntityId or legalEntityIdResponse then legalEntityResponse.legalEntityId == null and legalEntityResponse.originallegalEntityId == null.

I would expect in the above scenario for legalEntityId == null but for originallegalEntityId to equal the originalLegalEntityId from the response XML.

This appears to be a serialization issue - the XML is cased with an upper-case "Legal" while the C# property is written with a lower-case "legal". This appears to also be the issue with originalLegalEntityStatus.

I believe the following property needs to be changed, or extra code needs to be added to properly convert the raw XML into the properties listed above
https://github.com/Vantiv/payfac-mp-sdk-dotnet/blob/13.x/PayFacMpSDK/PayFacMpSDK/Generated.cs#L3693

Example request XML (preprod env url removed):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<legalEntityCreateRequest
	xmlns="http://preprod-url">
	<legalEntityName>Yarrgh Pirate Co.</legalEntityName>
	<legalEntityType>INDIVIDUAL_SOLE_PROPRIETORSHIP</legalEntityType>
	<legalEntityOwnershipType>PRIVATE</legalEntityOwnershipType>
	<doingBusinessAs>Jolly Roger Services</doingBusinessAs>
	<taxId>551351516</taxId>
	<contactPhone>5555555555</contactPhone>
	<annualCreditCardSalesVolume>0</annualCreditCardSalesVolume>
	<hasAcceptedCreditCards>false</hasAcceptedCreditCards>
	<address>
		<streetAddress1>2223 Executive Dr</streetAddress1>
		<streetAddress2>Suite 104</streetAddress2>
		<city>Detroit</city>
		<stateProvince>MI</stateProvince>
		<postalCode>48201</postalCode>
		<countryCode>USA</countryCode>
	</address>
	<principal>
		<firstName>Joeya</firstName>
		<lastName>Schmoeya</lastName>
		<emailAddress>[email protected]</emailAddress>
		<ssn>111111113</ssn>
		<contactPhone>1111111111</contactPhone>
		<dateOfBirth>1982-01-31</dateOfBirth>
		<address>
			<streetAddress1>900 Chelmsford St</streetAddress1>
			<streetAddress2>Ste 5</streetAddress2>
			<city>Royal Oak</city>
			<stateProvince>MI</stateProvince>
			<postalCode>48067</postalCode>
			<countryCode>USA</countryCode>
		</address>
		<stakePercent>100</stakePercent>
	</principal>
	<yearsInBusiness>0</yearsInBusiness>
</legalEntityCreateRequest>

Example response XML (preprod env url removed):

<legalEntityCreateResponse xmlns="http://preprod-url" duplicate="true">
    <transactionId>83982920810924792</transactionId>
    <originalLegalEntityId>83982920810690989</originalLegalEntityId>
    <originalLegalEntityStatus>Approved</originalLegalEntityStatus>
</legalEntityCreateResponse>

Example C# code to generate above XML (config removed):

var request = new legalEntityCreateRequest
{
    legalEntityName = "Yarrgh Pirate Co.",
    legalEntityType = legalEntityType.LIMITED_LIABILITY_COMPANY,
    legalEntityOwnershipType = legalEntityOwnershipType.PRIVATE,
    doingBusinessAs = "Jolly Roger Services",
    taxId = "551351516",
    contactPhone = "5555555555",
    annualCreditCardSalesVolume = "0",
    hasAcceptedCreditCards = false,
    address =  new address()
    {
        streetAddress1 = "2223 Executive Dr",
        city = "Suite 104",
        stateProvince = "Detroit",
        postalCode = "48201",
        countryCode = "USA"
    },
    principal = new legalEntityPrincipal
    {
        firstName = "Joeya",
        lastName = "Schmoeya",
        emailAddress = "[email protected]",
        ssn = "111111113",
        contactPhone = "1111111111",
        dateOfBirth =  (new DateTime(1982, 1, 31)).Value,
        address = new principalAddress()
        {
            streetAddress1 = "900 Chelmsford St",
            streetAddress2 = "Ste 5",
            city = "Royal Oak",
            stateProvince = "MI",
            postalCode = "48067",
            countryCode = "USA"
        },
        stakePercent = 100
    },
    yearsInBusiness = "0",
};
var response = request.PostLegalEntityCreateRequest();
if (respose.legalEntityId == null) {
  Assert.True(response.orignallegalEntityId, null);
  Assert.True(response.originallegalEntityStatus, null);
}

Please let me know if further info is needed.

Edit: had a typo in my example code

@bdunn313
Copy link
Author

Any update on this?

@VantivSDK
Copy link
Contributor

Thanks for reaching out to us with the details. We have released new version 13.0.4 of the SDK with the fixes. Please check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants