Skip to content

Commit

Permalink
Bump version to 2.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
devops-blockchyp committed Nov 20, 2024
1 parent a07b030 commit b5cfbd4
Show file tree
Hide file tree
Showing 19 changed files with 1,932 additions and 6 deletions.
89 changes: 88 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,53 @@ Console.WriteLine(response);

```

#### Card Metadata



* **API Credential Types:** Merchant
* **Required Role:** Payment API Access

This API allows you to retrieve card metadata.

Card metadata requests can use a payment terminal to retrieve metadata or
use a previously enrolled payment token.

**Terminal Transactions**

For terminal transactions, make sure you pass in the terminal name using the `terminalName` property.

**Token Transactions**

If you have a payment token, omit the `terminalName` property and pass in the token with the `token`
property instead.

**Card Numbers and Mag Stripes**

You can also pass in PANs and Mag Stripes, but you probably shouldn't, as this will
put you in PCI scope and the most common vector for POS breaches is keylogging.
If you use terminals for manual card entry, you'll bypass any keyloggers that
might be maliciously running on the point-of-sale system.




```c#
// Populate request parameters.
CardMetadataRequest request = new CardMetadataRequest
{
Test = true,
TerminalName = "Test Terminal",
};

// Run the transaction.
CardMetadataResponse response = await blockchyp.CardMetadataAsync(request);

// View the result.
Console.WriteLine(response);

```

#### Time Out Reversal


Expand Down Expand Up @@ -3628,7 +3675,7 @@ By default no roles will be assigned unless valid, comma-delimited, role codes a
// Populate request parameters.
MerchantCredentialGenerationRequest request = new MerchantCredentialGenerationRequest
{

MerchantId = "<MERCHANT ID>",
};

// Run the transaction.
Expand All @@ -3639,6 +3686,46 @@ Console.WriteLine(response);

```

#### Submit Application



* **API Credential Types:** Partner
* **Required Role:** INVITE MERCHANT

This is a partner level API that can be used to submit applications to add new merchant accounts. The application requires a significant amount of detailed information about the merchant and their business. Rather than providing an exhaustive list of required fields, we recommend submitting as much information as possible in your initial request.

If any required fields are missing or if there are any validation errors, the API will return specific error messages indicating which fields need to be addressed. Simply review these validation errors, fill in the missing information or correct any errors, and resubmit the application.

Key areas of information include:
- Business details (name, type, tax information)
- Contact information
- Address information (physical and mailing)
- Owner details
- Bank account information
- Transaction volume estimates
- Operational settings (timezone, batch close time, etc.)

**Note:** Some fields may be conditionally required based on the values of other fields. The validation process will guide you through ensuring all necessary information is provided.




```c#
// Populate request parameters.
SubmitApplicationRequest request = new SubmitApplicationRequest
{

};

// Run the transaction.
Acknowledgement response = await blockchyp.SubmitApplicationAsync(request);

// View the result.
Console.WriteLine(response);

```




Expand Down
2 changes: 1 addition & 1 deletion src/BlockChyp/BlockChyp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>BlockChyp is a .NET 4.5+ class library for accessing the BlockChyp Terminal and Gateway APIs.</Description>
<Version>2.19.0</Version>
<Version>2.20.1</Version>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<Authors>BlockChyp</Authors>
<Company>BlockChyp, Inc.</Company>
Expand Down
62 changes: 62 additions & 0 deletions src/BlockChyp/Client/BlockChypClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,49 @@ public EnrollResponse Enroll(EnrollRequest request)
.ConfigureAwait(false).GetAwaiter().GetResult();
}

/// <summary>
/// Retrieves card metadata.
/// </summary>
/// <param name="request">The request details.</param>
public async Task<CardMetadataResponse> CardMetadataAsync(CardMetadataRequest request)
{
ISignatureRequest signatureRequest = request as ISignatureRequest;
if (signatureRequest != null)
{
PopulateSignatureOptions(signatureRequest);
}

CardMetadataResponse response;
if (await IsTerminalRouted(request.TerminalName).ConfigureAwait(false))
{
response = await TerminalRequestAsync<CardMetadataResponse>(HttpMethod.Post, "/api/card-metadata", request.TerminalName, request)
.ConfigureAwait(false);
}
else
{
response = await GatewayRequestAsync<CardMetadataResponse>(HttpMethod.Post, "/api/card-metadata", request, null, request.Test, relay: true)
.ConfigureAwait(false);
}

ISignatureResponse signatureResponse = response as ISignatureResponse;
if (signatureRequest != null && signatureResponse != null)
{
DumpSignatureFile(signatureRequest, signatureResponse);
}

return response;
}

/// <summary>
/// Synchronous form of <see cref="CardMetadataAsync"/>.
/// </summary>
/// <param name="request">The request details.</param>
public CardMetadataResponse CardMetadata(CardMetadataRequest request)
{
return CardMetadataAsync(request)
.ConfigureAwait(false).GetAwaiter().GetResult();
}

/// <summary>
/// Activates or recharges a gift card.
/// </summary>
Expand Down Expand Up @@ -974,6 +1017,25 @@ public MerchantCredentialGenerationResponse MerchantCredentialGeneration(Merchan
return DashboardRequest<MerchantCredentialGenerationResponse>(HttpMethod.Post, "/api/generate-merchant-creds", request, null);
}

/// <summary>
/// Submits and application to add a new merchant account.
/// </summary>
/// <param name="request">The request details.</param>
public async Task<Acknowledgement> SubmitApplicationAsync(SubmitApplicationRequest request)
{
return await DashboardRequestAsync<Acknowledgement>(HttpMethod.Post, "/api/submit-application", request, null)
.ConfigureAwait(false);
}

/// <summary>
/// Synchronous form of <see cref="SubmitApplicationAsync"/>.
/// </summary>
/// <param name="request">The request details.</param>
public Acknowledgement SubmitApplication(SubmitApplicationRequest request)
{
return DashboardRequest<Acknowledgement>(HttpMethod.Post, "/api/submit-application", request, null);
}

/// <summary>
/// Adds a test merchant account.
/// </summary>
Expand Down
Loading

0 comments on commit b5cfbd4

Please sign in to comment.