Skip to content

Commit

Permalink
BuildMaster release: v1.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
securesubmit-buildmaster committed Sep 24, 2019
1 parent dbc1436 commit 29c6ca7
Show file tree
Hide file tree
Showing 26 changed files with 826 additions and 154 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System;

namespace TestBoardingAPI.Models {
public class CompletedApplication {
public int Id { get; set; }
public string Status { get; set; }
public DateTime SubmittedDate { get; set; }
}
}
39 changes: 39 additions & 0 deletions src/GlobalPayments.Api/Builders/AuthorizationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,24 @@ public class AuthorizationBuilder : TransactionBuilder<Transaction> {
internal string ClientTransactionId { get; set; }
internal string Currency { get; set; }
internal string CustomerId { get; set; }
internal Customer CustomerData { get; set; }
internal List<string[]> CustomData { get; set; }
internal string CustomerIpAddress { get; set; }
internal string Cvn { get; set; }
internal string Description { get; set; }
internal DecisionManager DecisionManager { get; set; }
internal string DynamicDescriptor { get; set; }
internal EcommerceInfo EcommerceInfo { get; set; }
internal EmvChipCondition EmvChipCondition { get; set; }
internal FraudFilterMode FraudFilterMode { get; set; }
internal decimal? Gratuity { get; set; }
internal decimal? ConvenienceAmt { get; set; }
internal decimal? ShippingAmt { get; set; }
internal HostedPaymentData HostedPaymentData { get; set; }
internal string InvoiceNumber { get; set; }
internal bool Level2Request { get; set; }
internal string MessageAuthenticationCode { get; set; }
internal List<string[]> MiscProductData { get; set; }
internal string OfflineAuthCode { get; set; }
internal bool OneTimePayment { get; set; }
internal string OrderId { get; set; }
Expand Down Expand Up @@ -213,6 +219,20 @@ public AuthorizationBuilder WithCurrency(string value) {
return this;
}

public AuthorizationBuilder WithCustomData(params string[] values) {
if (CustomData == null) {
CustomData = new List<string[]>();
}
CustomData.Add(values);

return this;
}

public AuthorizationBuilder WithCustomerData(Customer value) {
CustomerData = value;
return this;
}

/// <summary>
/// Sets the customer ID; where applicable.
/// </summary>
Expand Down Expand Up @@ -249,6 +269,16 @@ public AuthorizationBuilder WithCvn(string value) {
return this;
}

public AuthorizationBuilder WithDccRateData(DccRateData value) {
DccRateData = value;
return this;
}

public AuthorizationBuilder WithDecisionManager(DecisionManager value) {
DecisionManager = value;
return this;
}

/// <summary>
/// Sets the transaction's description.
/// </summary>
Expand Down Expand Up @@ -390,6 +420,15 @@ public AuthorizationBuilder WithMessageAuthenticationCode(string value) {
return this;
}

public AuthorizationBuilder WithMiscProductData(params string[] values) {
if (MiscProductData == null) {
MiscProductData = new List<string[]>();
}
MiscProductData.Add(values);

return this;
}

/// <summary>
/// Sets the offline authorization code; where applicable.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/GlobalPayments.Api/Builders/TransactionBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public abstract class TransactionBuilder<TResult> : BaseBuilder<TResult> {
internal TransactionModifier TransactionModifier { get; set; }
internal IPaymentMethod PaymentMethod { get; set; }
internal bool MultiCapture { get; set; }
internal DccRateData DccRateData { get; set; }

public TransactionBuilder(TransactionType type) : base() {
TransactionType = type;
Expand Down
8 changes: 8 additions & 0 deletions src/GlobalPayments.Api/Entities/Customer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ public class Customer : RecurringEntity<Customer> {
/// </summary>
public string Company { get; set; }

public string CustomerPassword { get; set; }

public string DateOfBirth { get; set; }

public string DomainName { get; set; }

public string DeviceFingerPrint { get; set; }

/// <summary>
/// Customer's address
/// </summary>
Expand Down
18 changes: 18 additions & 0 deletions src/GlobalPayments.Api/Entities/DccRateData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using GlobalPayments.Api.Entities;
using System;

namespace GlobalPayments.Api.Entities {
public class DccRateData {
public decimal? CardHolderAmount { get; set; }
public string CardHolderCurrency { get; set; }
public string CardHolderRate { get; set; }
public string CommissionPercentage { get; set; }
public DccProcessor DccProcessor { get; set; }
public DccRateType DccRateType { get; set; }
public string ExchangeRateSourceName { get; set; }
public DateTime ExchangeRateSourceTimestamp { get; set; }
public decimal? MerchantAmount { get; set; }
public string MerchantCurrency { get; set; }
public string MarginRatePercentage { get; set; }
}
}
21 changes: 21 additions & 0 deletions src/GlobalPayments.Api/Entities/DecisionManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace GlobalPayments.Api.Entities {
public class DecisionManager {
public string BillToHostName { get; set; }
public bool BillToHttpBrowserCookiesAccepted { get; set; }
public string BillToHttpBrowserEmail { get; set; }
public string BillToHttpBrowserType { get; set; }
public string BillToIpNetworkAddress { get; set; }
public string BusinessRulesCoreThreshold { get; set; }
public string BillToPersonalId { get; set; }
public string DecisionManagerProfile { get; set; }
public string InvoiceHeaderTenderType { get; set; }
public Risk ItemHostHedge { get; set; }
public Risk ItemNonsensicalHedge { get; set; }
public Risk ItemObscenitiesHedge { get; set; }
public Risk ItemPhoneHedge { get; set; }
public Risk ItemTimeHedge { get; set; }
public Risk ItemVelocityHedge { get; set; }
public bool InvoiceHeaderIsGift { get; set; }
public bool InvoiceHeaderReturnsAccepted { get; set; }
}
}
7 changes: 6 additions & 1 deletion src/GlobalPayments.Api/Entities/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,12 @@ public enum TransactionType {
/// <summary>
///
/// </summary>
PreAuthCompletion = 1 << 30
PreAuthCompletion = 1 << 30,

/// <summary>
///
/// </summary>
DccRateLookup = 1 << 31
}

/// <summary>
Expand Down
6 changes: 6 additions & 0 deletions src/GlobalPayments.Api/Entities/Enums/DccProcessor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace GlobalPayments.Api.Entities {
public enum DccProcessor {
Fexco,
Euroconex
}
}
6 changes: 6 additions & 0 deletions src/GlobalPayments.Api/Entities/Enums/DccRateType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace GlobalPayments.Api.Entities {
public enum DccRateType {
Sale,
Refund
}
}
8 changes: 8 additions & 0 deletions src/GlobalPayments.Api/Entities/Enums/Risk.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System;

namespace GlobalPayments.Api.Entities {
public enum Risk {
High,
Low
}
}
2 changes: 2 additions & 0 deletions src/GlobalPayments.Api/Entities/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public string ClientTransactionId {
/// </summary>
public string CvnResponseMessage { get; set; }

public DccRateData DccRateData { get; set; }

public DebitMac DebitMac { get; set; }

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/GlobalPayments.Api/Gateways/Gp3DSProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Transaction ProcessSecure3d(Secure3dBuilder builder) {
queryValues.Add("merchant_id", MerchantId);
queryValues.Add("request_timestamp", timestamp);

string rawResponse = DoTransaction(HttpMethod.Get, string.Format("authentications/{0}", builder.ServerTransactionId), request.ToString(), queryValues);
string rawResponse = DoTransaction(HttpMethod.Get, string.Format("authentications/{0}", builder.ServerTransactionId), null, queryValues);
return MapResponse(rawResponse);
}
else if (transType.Equals(TransactionType.InitiateAuthentication)) {
Expand Down
Loading

0 comments on commit 29c6ca7

Please sign in to comment.