Skip to content

Commit

Permalink
Branchfor12 37 (#70)
Browse files Browse the repository at this point in the history
* Comminting changes for v12.34

* comminiting remaining code changes and test cases for changes for 12.34

* promoting phone number feild in 12.34

* Promoting changes for version12.35.

* Promoting changes for 12.36

* Promoting coding and testing changes for 12.37

* Promoting changes for Btch testing .

* Unit test case for 12.37

* Commiting existing test case fixes.

* Promoting changes for csproj file

* commiting changes fir changelog

* Promoting changes

---------

Co-authored-by: e5651806 <[email protected]>
  • Loading branch information
SushamaGhadage0310 and Sushamaghadage123 committed Jun 25, 2024
1 parent 2b20690 commit f5539ba
Show file tree
Hide file tree
Showing 28 changed files with 2,721 additions and 75 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@

= Worldpay CNP CHANGELOG


==Version 12.37.0 (v12.37.0)(June 25, 2024)
* Change: [cnpAPI v12.37] New existing 'postCheckoutRedirectUrl' with min length '1' and maxlength '200'
* Change: [cnpAPI v12.37] New enum 'provider' is added with value 'AFFIRM'
* Change: [cnpAPI v12.37] New complex type 'inquiryResultType' is added with simple element 'response' of 'responseType' and 'message' of 'messageType'.
* Change: [cnpAPI v12.37] New complex element 'BNPLAuthorizationRequest' is added with added with few simple elements and few complex elements- simple elements 'amount','orderId' ,'provider' of type 'provider' and complex elements 'customerInfo','billToAddress','shipToAddress','enhancedData','postCheckoutRedirectUrl'
* Change: [cnpAPI v12.37] New complex element 'BNPLAuthResponse' is added with few simple elements ,existing simple elements 'cnpTxnId','response','responseTime','message','location' and 'checkoutUrl'
* Change: [cnpAPI v12.37] New complex element 'BNPLCaptureRequest' is added with existing simple element 'amount','orderId','cnpTxnId'
* Change: [cnpAPI v12.37] New complex element 'BNPLCaptureResponse' is added with existing simple element 'cnpTxnId','response','responseTime','message','location'
* Change: [cnpAPI v12.37] New complex element 'BNPLRefundRequest' is added with existing simple element 'amount','orderId','cnpTxnId'
* Change: [cnpAPI v12.37] New complex element 'BNPLRefundResponse' is added with existing simple element 'cnpTxnId','response','responseTime','message','location'
* Change: [cnpAPI v12.37] New complex element 'BNPLCancelRequest' is added with existing simple element 'amount','orderId','cnpTxnId'
* Change: [cnpAPI v12.37] New complex element 'BNPLCancelResponse' is added with existing simple element 'cnpTxnId','response','responseTime','message','location'
* Change: [cnpAPI v12.37] New complex element 'BNPLInquiryRequest' is added with existing simple element 'orderId','cnpTxnId'
* Change: [cnpAPI v12.37] New complex element 'BNPLInquiryResponse' is added with existing simple element 'cnpTxnId','response','responseTime','message','location' and complex element 'inquiryResult' of 'inquiryResultType'
* Change: [cnpAPI v12.36] new Enum is added 'accountFundingTransactionTypeEnum' with new values 'accountToAccount','agentCashOut','bankInitiated','businessDisbursement','businessToBusinessTransfer','debitPrepaidAccount','fundsDisbursement','fundTransfer','governmentNonProfitDisbursement','paymentOfOwnCreditCardBill','payrollDisbursement','personToPerson','personToPersonCardAccount','rapidMerchantSettlement','topUp','walletTransfer'
* Change: [cnpAPI v12.36] new Enum is added 'accountFundingTransactionAccountNumberTypeEnum' with new values 'other','RTNAndBAN','IBAN','cardAccount','email','phoneNumber','BANAndBIC','walletID','socialNetworkID'
* Change: [cnpAPI v12.36] New complex 'finicityAccountRequest' element is added with simple element 'echeckCustomerId' of type 'string25Type'
* Change: [cnpAPI v12.36] New complex 'finicityAccountResponse' element is added with simple elements 'cnpTxnId','response','responseTime','message','location' and new complex element 'finicityAccount' of type 'finicityAccountInfoType'
* Change: [cnpAPI v12.36] To support 'finicityAccount' new complex type 'finicityAccountInfoType' is added with simple element accountId' of 'string','accType' of type 'echeckAccountTypeEnum','realAccNum' of 'echeckAccountNumberType','routingNum' of 'routingNumberType'
* Change: [cnpAPI v12.36] new element 'fraudCheckAction' of 'fraudCheckActionEnum' is added in Authorization, sale request.
* Change: [cnpAPI v12.36] New values added 'APPROVED_SKIP_FRAUD_CHECK','DECLINED_NEED_FRAUD_CHECK' to existing 'fraudCheckActionEnum'
* Change: [cnpAPI v12.36] New simple element 'accountId' of type 'string' is added in 'echeckType' existing complex type.
* Change: [cnpAPI v12.36] new simple elements are added in existing complex element accountFundingTransactionData,'receiverAccountNumberType' of 'accountFundingTransactionAccountNumberTypeEnum' and 'accountFundingTransactionType' of 'accountFundingTransactionTypeEnum'
* Change: [cnpAPI v12.35] In existing Enum businessIndicatorEnum new values 'personToPersonCardAccount','debitPrepaidAccount','paymentOfOwnCreditCardBill','businessDisbursement','businessToBusinessTransfer','governmentNonProfitDisbursement','rapidMerchantSettlement','agentCashOut' are added.
* Change: [cnpAPI v12.35] New Enum 'stateTypeEnum' is added with values 'AL','AK','AZ','AR','CA','CO','CT','DE','DC','FL','GA','HI','ID','IL','IN','IA','KS','KY','LA','ME','MD','MA','MI','MN','MS','MO','MT','NE','NV','NH','NJ','NM','NY','NC','ND','OH','OK','OR','PA','RI','SC','SD','TN','TX','UT','VT','VA','WA','WV','WI','WY','AB','BC','MB','NB','NL','NT','NS','ON','PE','QC','SK','YT','NU'
* Change: [cnpAPI v12.35] In existing Enum fulfilmentMethodTypeEnum new values 'STANDARD_SHIPPING' and 'EXPEDITED_SHIPPING'
* Change: [cnpAPI v12.35] In existing Enum orderChannelEnum new values 'SCAN_AND_GO' and 'SMART_TV'
* Change: [cnpAPI v12.35] New complex element 'accountFundingTransactionData' added with below simple elements receiverFirstName of 'string35Type' ,'receiverLastName' of 'string35Type','receiverState' of 'stateTypeEnum',''receiverCountry' of 'countryTypeEnum' and 'receiverAccountNumber' of 'string50Type'
* Change: [cnpAPI v12.35] 'accountFundingTransactionData' is added in Authorization,sale,credit,capturegiventAuth and FORCECapture request.
* Change: [cnpAPI v12.34] For existing simple element 'amount' simple type is changed from 'transactionAmountType' to 'achTransactionAmountType' in transactions- vendorCredit,vendorDebit,submerchantCredit,submerchantDebit,payFacDebit,payFacCredit,reserveCredit,reserveDebit
* Change: [cnpAPI v12.34] Added new simple type 'achTransactionAmountType' to support 'amount'.
* Change: [cnpAPI v12.34] Added 'accountToAccount','bankInitiated','fundsDisbursement','payrollDisbursement','personToPerson','topUp' in existing enum businessIndicatorEnum.
* Change: [cnpAPI v12.34] For existing element 'origId' from 'queryTransaction' simpletype changed from 'string25Type' to 'stringMin1Max36CollapseWhiteSpaceType'.
* Change: [cnpAPI v12.34] New request element 'finicityUrlRequest' is added with subfeilds-'firstName','lastName','phoneNumber','email'.
* Change: [cnpAPI v12.34] New response element 'finicityUrlResponse' is added with subfeilds-'cnpTxnId','response','responseTime','message','location','echeckCustomerId','url'.
* Change: [cnpAPI v12.34] New simple element 'echeckCustomerId' is added existing complex type 'echeckType'.

==Version: 12.33.0 (Jan 09, 2024)
Note: It contains changes from cnpAPI v12.32 and v12.33. In case you need any feature supported by cnpAPI v12.32 and v12.33.please use SDK version 12.33.0.

Expand Down
161 changes: 158 additions & 3 deletions CnpSdkForNet/CnpSdkForNet/CnpOnline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,42 @@ private cnpOnlineRequest CreateRequest(transactionRequest transaction)
{
request.vendorDebit = (vendorDebit)transaction;
}
else if (transaction is customerDebit)
else if (transaction is customerDebit)
{
request.customerDebit = (customerDebit)transaction;
}
else if (transaction is customerCredit)
{
request.customerCredit = (customerCredit)transaction;
}
else if (transaction is finicityUrlRequest)
{
request.finicityUrlRequest = (finicityUrlRequest)transaction;
}
else if (transaction is finicityAccountRequest)
{
request.finicityAccountRequest = (finicityAccountRequest)transaction;
}
else if (transaction is BNPLAuthorizationRequest)
{
request.BNPLAuthorizationRequest = (BNPLAuthorizationRequest)transaction;
}
else if (transaction is BNPLCaptureRequest)
{
request.BNPLCaptureRequest = (BNPLCaptureRequest)transaction;
}
else if (transaction is BNPLRefundRequest)
{
request.BNPLRefundRequest = (BNPLRefundRequest)transaction;
}
else if (transaction is BNPLCancelRequest)
{
request.BNPLCancelRequest = (BNPLCancelRequest)transaction;
}
else if (transaction is BNPLInquiryRequest)
{
request.BNPLInquiryRequest = (BNPLInquiryRequest)transaction;
}
else
{
throw new NotImplementedException("Support for type: " + transaction.GetType().Name +
Expand Down Expand Up @@ -1070,6 +1098,121 @@ public Task<customerDebitResponse> CustomerDebitAsync(customerDebit customerDebi
}, customerDebit, cancellationToken);
}

public finicityUrlResponse FinicityUrl(finicityUrlRequest finicityUrlRequest)
{

var cnpResponse = SendRequest(response => response, finicityUrlRequest);
var finicityUrlResponse = cnpResponse.finicityUrlResponse;
return finicityUrlResponse;
}

public Task<finicityUrlResponse> finicityUrlAsync(finicityUrlRequest finicityUrl, CancellationToken cancellationToken)
{
return SendRequestAsync(response =>
{
var finicityUrlResponse = response.finicityUrlResponse;
return finicityUrlResponse;
}, finicityUrl, cancellationToken);
}

public finicityAccountResponse FinicityAccount(finicityAccountRequest finicityAccountRequest)
{

var cnpResponse = SendRequest(response => response, finicityAccountRequest);
var finicityAccountResponse = cnpResponse.finicityAccountResponse;
return finicityAccountResponse;
}

public Task<finicityAccountResponse> finicityAccountAsync(finicityAccountRequest finicityAccount, CancellationToken cancellationToken)
{
return SendRequestAsync(response =>
{
var finicityAccountResponse = response.finicityAccountResponse;
return finicityAccountResponse;
}, finicityAccount, cancellationToken);
}

public BNPLAuthResponse BNPLAuthorization(BNPLAuthorizationRequest bnplAuth)
{

var cnpResponse = SendRequest(response => response, bnplAuth);
var BNPLAuthResponse = cnpResponse.BNPLAuthResponse;
return BNPLAuthResponse;
}

public Task<BNPLAuthResponse> BNPLAuthorizationAsync(BNPLAuthorizationRequest bnplAuth, CancellationToken cancellationToken)
{
return SendRequestAsync(response =>
{
var BNPLAuthResponse = response.BNPLAuthResponse;
return BNPLAuthResponse;
}, bnplAuth, cancellationToken);
}
public BNPLCaptureResponse BNPLCapture(BNPLCaptureRequest bnplCapture)
{

var cnpResponse = SendRequest(response => response, bnplCapture);
var BNPLCaptureResponse = cnpResponse.BNPLCaptureResponse;
return BNPLCaptureResponse;
}

public Task<BNPLCaptureResponse> BNPLCaptureAsync(BNPLCaptureRequest bnplCapture, CancellationToken cancellationToken)
{
return SendRequestAsync(response =>
{
var BNPLCaptureResponse = response.BNPLCaptureResponse;
return BNPLCaptureResponse;
}, bnplCapture, cancellationToken);
}
public BNPLRefundResponse BNPLRefund(BNPLRefundRequest bnplRefund)
{

var cnpResponse = SendRequest(response => response, bnplRefund);
var BNPLRefundResponse = cnpResponse.BNPLRefundResponse;
return BNPLRefundResponse;
}

public Task<BNPLRefundResponse> BNPLRefundAsync(BNPLRefundRequest bnplRefund, CancellationToken cancellationToken)
{
return SendRequestAsync(response =>
{
var BNPLRefundResponse = response.BNPLRefundResponse;
return BNPLRefundResponse;
}, bnplRefund, cancellationToken);
}

public BNPLCancelResponse BNPLCancle(BNPLCancelRequest bnplCancle)
{

var cnpResponse = SendRequest(response => response, bnplCancle);
var BNPLCancelResponse = cnpResponse.BNPLCancelResponse;
return BNPLCancelResponse;
}
public Task<BNPLCancelResponse> BNPLCancleAsync(BNPLCancelRequest bnplCancle, CancellationToken cancellationToken)
{
return SendRequestAsync(response =>
{
var BNPLCancelResponse = response.BNPLCancelResponse;
return BNPLCancelResponse;
}, bnplCancle, cancellationToken);
}

public BNPLInquiryResponse BNPLInquiry(BNPLInquiryRequest bnplInquiry)
{

var cnpResponse = SendRequest(response => response, bnplInquiry);
var BNPLInquiryResponse = cnpResponse.BNPLInquiryResponse;
return BNPLInquiryResponse;
}

public Task<BNPLInquiryResponse> BNPLInquiryAsync(BNPLInquiryRequest bnplInquiry, CancellationToken cancellationToken)
{
return SendRequestAsync(response =>
{
var BNPLInquiryResponse = response.BNPLInquiryResponse;
return BNPLInquiryResponse;
}, bnplInquiry, cancellationToken);
}

private cnpOnlineRequest CreateCnpOnlineRequest()
{
Expand Down Expand Up @@ -1276,8 +1419,20 @@ public interface ICnpOnline

translateToLowValueTokenResponse TranslateToLowValueTokenRequest(translateToLowValueTokenRequest translateToLowValueTokenRequest);
Task<translateToLowValueTokenResponse> TranslateToLowValueTokenRequestAsync(translateToLowValueTokenRequest translateToLowValueTokenRequest, CancellationToken cancellationToken);


finicityUrlResponse FinicityUrl(finicityUrlRequest finicityUrl);
Task<finicityUrlResponse> finicityUrlAsync(finicityUrlRequest finicityUrl, CancellationToken cancellationToken);
finicityAccountResponse FinicityAccount(finicityAccountRequest finicityAccount);
Task<finicityAccountResponse> finicityAccountAsync(finicityAccountRequest finicityAccount, CancellationToken cancellationToken);
BNPLAuthResponse BNPLAuthorization(BNPLAuthorizationRequest bnplAuth);
Task<BNPLAuthResponse> BNPLAuthorizationAsync(BNPLAuthorizationRequest bnplAuth, CancellationToken cancellationToken);
BNPLCaptureResponse BNPLCapture(BNPLCaptureRequest bnplCapture);
Task<BNPLCaptureResponse> BNPLCaptureAsync(BNPLCaptureRequest bnplCapture, CancellationToken cancellationToken);
BNPLRefundResponse BNPLRefund(BNPLRefundRequest bnplRefund);
Task<BNPLRefundResponse> BNPLRefundAsync(BNPLRefundRequest bnplRefund, CancellationToken cancellationToken);
BNPLCancelResponse BNPLCancle(BNPLCancelRequest bnplCancle);
Task<BNPLCancelResponse> BNPLCancleAsync(BNPLCancelRequest bnplCancle, CancellationToken cancellationToken);
BNPLInquiryResponse BNPLInquiry(BNPLInquiryRequest bnplInquiry);
Task<BNPLInquiryResponse> BNPLInquiryAsync(BNPLInquiryRequest bnplInquiry, CancellationToken cancellationToken);
event EventHandler HttpAction;
}
}
2 changes: 1 addition & 1 deletion CnpSdkForNet/CnpSdkForNet/CnpSdkForNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>dotNetSDKKey.snk</AssemblyOriginatorKeyFile>
<PackageVersion>12.33.0</PackageVersion>
<PackageVersion>12.37.0</PackageVersion>
<Title>Vantiv.CnpSdkForNet</Title>
<Authors>FIS</Authors>
<Copyright>Copyright © FIS 2020</Copyright>
Expand Down
4 changes: 2 additions & 2 deletions CnpSdkForNet/CnpSdkForNet/CnpVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Cnp.Sdk
*/
public class CnpVersion
{
public const String CurrentCNPXMLVersion = "12.33";
public const String CurrentCNPSDKVersion = "12.33.0";
public const String CurrentCNPXMLVersion = "12.37";
public const String CurrentCNPSDKVersion = "12.37.0";
}
}
Loading

0 comments on commit f5539ba

Please sign in to comment.