-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Payment: Add support for specifying payer details in OrderDetails (#726)
* Payment: Add support for specifying payer details in OrderDetails, allowing payment processors like Nets Easy to utalize the information when available. * Add comment about country code. * Add setting for MerchandHandlesConsumerData.
- Loading branch information
Showing
12 changed files
with
303 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
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
32 changes: 32 additions & 0 deletions
32
src/Altinn.App.Core/Features/Payment/Processors/Nets/Models/NetsCheckoutConsumerDetails.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
namespace Altinn.App.Core.Features.Payment.Processors.Nets.Models; | ||
|
||
internal class NetsCheckoutConsumerDetails | ||
{ | ||
public string? Reference { get; set; } | ||
public string? Email { get; set; } | ||
public NetsAddress? ShippingAddress { get; set; } | ||
public NetsAddress? BillingAddress { get; set; } | ||
public NetsPhoneNumber? PhoneNumber { get; set; } | ||
public NetsCheckoutPrivatePerson? PrivatePerson { get; set; } | ||
public NetsCheckoutCompany? Company { get; set; } | ||
} | ||
|
||
/// <remarks> | ||
/// Warning: Nets Easy API reference has multiple variants of private person objects. | ||
/// This is used for create payment, while NetsPaymentFull uses a different object to represent a private person. | ||
/// </remarks> | ||
internal class NetsCheckoutPrivatePerson | ||
{ | ||
public string? FirstName { get; set; } | ||
public string? LastName { get; set; } | ||
} | ||
|
||
/// <remarks> | ||
/// Warning: Nets Easy API reference has multiple variants of company objects. | ||
/// This is used for create payment, while NetsPaymentFull uses a different object to represent a private person. | ||
/// </remarks> | ||
internal class NetsCheckoutCompany | ||
{ | ||
public string? Name { get; set; } | ||
public NetsCheckoutPrivatePerson? Contact { get; set; } | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Altinn.App.Core/Features/Payment/Processors/Nets/Models/README.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# API Models Information | ||
|
||
This folder has the C# models used for the Nets Easy API. | ||
|
||
## Overview | ||
|
||
These models were manually created based on the JSON examples in the Nets API documentation. Since they were written by | ||
hand, there might be some unintentional differences from the actual API objects. | ||
|
||
## API Reference | ||
|
||
The models are based on the following API documentation: | ||
|
||
- [Nets Easy Payment API](https://developer.nexigroup.com/nexi-checkout/en-EU/api/payment-v1/) | ||
|
||
## Notes | ||
|
||
- **Manual Creation**: Since these were manually created, there could be some mismatches between the models and the | ||
actual API. | ||
- **Check for Updates**: Refer back to the official API docs for the most up-to-date information. | ||
|
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
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
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
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
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
Oops, something went wrong.