Skip to content

Commit

Permalink
Dot Net SDK v12.40.0 (#72)
Browse files Browse the repository at this point in the history
* Promoting changes for 12.38 and 12.39

* promoting encryptionKeyRequest Changes.

* promoting encryptionKeyRequestChanges

* promoting changes for encryptionPayload  request

* promoting working encryption changes for payload Request.

* promoting cnpOnline corrections

* promoting changes for unit test .

* Removing unwanted code.

* promoting changeLog and Version realted changes

* Method name correction

* Promoting changes

---------

Co-authored-by: e5651806 <sushamaghadage38@gmail.com>
  • Loading branch information
SushamaGhadage0310 and Sushamaghadage123 authored Oct 17, 2024
1 parent f5539ba commit a5ea801
Show file tree
Hide file tree
Showing 50 changed files with 2,542 additions and 635 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@

= Worldpay CNP CHANGELOG
==Change Log for 12.40(October 16,2024)
* Change: [cnpAPI v12.40] In authorization,sale and captureGivenAuth request new elements added-> 'typeOfDigitalCurrency' and 'conversionAffiliateId'.
* Change: [cnpAPI v12.40] In existing simple type transactionAmountType range added between minInclusive value -999999999999 and maxInclusive value 999999999999
* Change: [cnpAPI v12.40] In existing type authenticationProtocolVersionType new values '3','4','5','6','7','8' and '9' are added
* Change: [cnpAPI v12.39] In 'subMerchantCredit' 'payFacCredit','reserveCredit', 'payoutOrgCreditRequest' base changed from 'transactionTypeWithReportGroup' to 'transactionTypeWithReportGroupAndRtp'.
* Change: [cnpAPI v12.39] To support new changed extension base for above txns ,New Complextype 'transactionTypeWithReportGroupAndRtp' added.
* Change: [cnpAPI v12.39] New element 'fundingTransactionReferenceNumber' in authorization and sale response.
* Change: [cnpAPI v12.38] In existing Enum 'ActionTypeEnum' new value 'FIVD' added
* Change: [cnpAPI v12.38] In existing complex element 'baseRequest' two more choices are added 'encryptionKeyRequest' and 'encryptedPayload'
* Change: [cnpAPI v12.38] In existing complex element 'cnpOnlineResponse' one more choice is added 'encryptionKeyResponse'
* Change: [cnpAPI v12.38] New element 'encryptionKeyRequest' is added of type 'encryptionKeyRequestEnum'
* Change: [cnpAPI v12.38] To support 'encryptionKeyRequest' new Enum 'encryptionKeyRequestEnum' added with values 'CURRENT' and 'PREVIOUS'
* Change: [cnpAPI v12.38] New complex element 'encryptionKeyResponse' is added with simple elements ->'encryptionKeySequence' of type 'encryptionKeySequenceType' and 'encryptionKey' of type 'encryptionKeyType'
* Change: [cnpAPI v12.38] To support 'encryptionKeySequence' new simple type 'encryptionKeySequenceType' added with total Digits 19
* Change: [cnpAPI v12.38] To support 'encryptionKey' new simple type 'encryptionKeyType' of type string with maxLength 15000
* Change: [cnpAPI v12.38] New complex element 'encryptedPayload' is added with simple elements ->'encryptionKeySequence' of type 'encryptionKeySequenceType' and 'payload' of type 'payloadType'
* Change: [cnpAPI v12.38] To support 'payload' new simple type 'payloadType' of type string with maxLength 15000
* Change: [cnpAPI v12.38] In capture Request new complex element 'partialCapture' is added with elements-> 'partialCaptureSequenceNumber' of type 'integer' and 'partialCaptureTotalCount' of type 'partialCaptureCount'


==Version 12.37.0 (v12.37.0)(June 25, 2024)
Expand Down
44 changes: 36 additions & 8 deletions CnpSdkForNet/CnpSdkForNet/CnpBatchRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Security;
using static System.Net.WebRequestMethods;

namespace Cnp.Sdk
{
Expand Down Expand Up @@ -1673,6 +1674,13 @@ private string saveElement(cnpFile cnpFile, cnpTime cnpTime, string filePath, tr
}

private void fillInReportGroup(transactionTypeWithReportGroup txn)
{
if (txn.reportGroup == null)
{
txn.reportGroup = config["reportGroup"];
}
}
private void fillInReportGroup(transactionTypeWithReportGroupAndRtp txn)
{
if (txn.reportGroup == null)
{
Expand Down Expand Up @@ -2112,7 +2120,7 @@ public override string Serialize()
}
}

public partial class submerchantCredit : transactionTypeWithReportGroup
public partial class submerchantCredit : transactionTypeWithReportGroupAndRtp
{

public string fundingSubmerchantId { get; set; }
Expand All @@ -2135,7 +2143,12 @@ public override string Serialize()
xml += "id=\"" + SecurityElement.Escape(id) + "\" ";
if (customerId != null)
xml += "customerId=\"" + SecurityElement.Escape(customerId) + "\" ";
xml += "reportGroup=\"" + SecurityElement.Escape(reportGroup) + "\">";
xml += "reportGroup=\"" + SecurityElement.Escape(reportGroup) + "\" ";
if (rtpSet)
{
xml += " rtp=\"" + rtp.ToString().ToLower() + "\"";
}
xml += ">";
if (fundingSubmerchantId != null)
xml += "\r\n<fundingSubmerchantId>" + SecurityElement.Escape(fundingSubmerchantId) + "</fundingSubmerchantId>";
if (submerchantName != null)
Expand All @@ -2159,7 +2172,7 @@ public override string Serialize()
}
}

public partial class payFacCredit : transactionTypeWithReportGroup
public partial class payFacCredit : transactionTypeWithReportGroupAndRtp
{

public string fundingSubmerchantId { get; set; }
Expand All @@ -2176,7 +2189,12 @@ public override string Serialize()
xml += "id=\"" + SecurityElement.Escape(id) + "\" ";
if (customerId != null)
xml += "customerId=\"" + SecurityElement.Escape(customerId) + "\" ";
xml += "reportGroup=\"" + SecurityElement.Escape(reportGroup) + "\">";
xml += "reportGroup=\"" + SecurityElement.Escape(reportGroup) + "\" ";
if (rtpSet)
{
xml += " rtp=\"" + rtp.ToString().ToLower() + "\"";
}
xml += ">";
if (fundingSubmerchantId != null)
xml += "\r\n<fundingSubmerchantId>" + SecurityElement.Escape(fundingSubmerchantId) + "</fundingSubmerchantId>";
if (fundsTransferId != null)
Expand All @@ -2190,7 +2208,7 @@ public override string Serialize()
}
}

public partial class reserveCredit : transactionTypeWithReportGroup
public partial class reserveCredit : transactionTypeWithReportGroupAndRtp
{

public string fundingSubmerchantId { get; set; }
Expand All @@ -2209,7 +2227,12 @@ public override string Serialize()
xml += "id=\"" + SecurityElement.Escape(id) + "\" ";
if (customerId != null)
xml += "customerId=\"" + SecurityElement.Escape(customerId) + "\" ";
xml += "reportGroup=\"" + SecurityElement.Escape(reportGroup) + "\">";
xml += "reportGroup=\"" + SecurityElement.Escape(reportGroup) + "\" ";
if (rtpSet)
{
xml += " rtp=\"" + rtp.ToString().ToLower() + "\"";
}
xml += ">";
if (fundingSubmerchantId != null)
xml += "\r\n<fundingSubmerchantId>" + SecurityElement.Escape(fundingSubmerchantId) + "</fundingSubmerchantId>";
else if (fundingCustomerId != null)
Expand Down Expand Up @@ -2321,7 +2344,7 @@ public override string Serialize()
}
}

public partial class payoutOrgCredit : transactionTypeWithReportGroup
public partial class payoutOrgCredit : transactionTypeWithReportGroupAndRtp
{

public string fundingCustomerId { get; set; }
Expand All @@ -2338,7 +2361,12 @@ public override string Serialize()
xml += "id=\"" + SecurityElement.Escape(id) + "\" ";
if (customerId != null)
xml += "customerId=\"" + SecurityElement.Escape(customerId) + "\" ";
xml += "reportGroup=\"" + SecurityElement.Escape(reportGroup) + "\">";
xml += "reportGroup=\"" + SecurityElement.Escape(reportGroup) + "\" ";
if (rtpSet)
{
xml += " rtp=\"" + rtp.ToString().ToLower() + "\"";
}
xml += ">";
if (fundingCustomerId != null)
xml += "\r\n<fundingCustomerId>" + SecurityElement.Escape(fundingCustomerId) + "</fundingCustomerId>";
if (fundsTransferId != null)
Expand Down
Loading

0 comments on commit a5ea801

Please sign in to comment.