Created
January 8, 2020 14:19
-
-
Save bdunn313/92ab466b3682539befbd8c165321ee16 to your computer and use it in GitHub Desktop.
originalLegalEntity not serialized properly in WorldPay C# SDK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>joe2a@example.com</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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<legalEntityCreateResponse xmlns="http://preprod-url" duplicate="true"> | |
<transactionId>83982920810924792</transactionId> | |
<originalLegalEntityId>83982920810690989</originalLegalEntityId> | |
<originalLegalEntityStatus>Approved</originalLegalEntityStatus> | |
</legalEntityCreateResponse> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = "joe2a@example.com", | |
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment