Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
Updating settlementCurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
ao committed Jan 26, 2016
1 parent c22e1fc commit d317ac9
Show file tree
Hide file tree
Showing 373 changed files with 844 additions and 110 deletions.
9 changes: 3 additions & 6 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ DotNet Library for Worldpay REST API (.NET 3.5+, .NET 2.0)
Initialize the REST client with the default URL and the specified service key and then use the required service:
```c#

WorldpayRestClient restClient = new WorldpayRestClient("https://api.worldpay.com/v1", "YOUR_SERVICE_KEY");

var orderRequest = new OrderRequest()
{
amount = 1999,
Expand Down Expand Up @@ -45,11 +47,6 @@ try {
}
```

Alternatively, the client can also be initialized with the REST service URL as well as the service key e.g.
```c#
WorldpayRestClient restClient = new WorldpayRestClient("https://api.worldpay.com/v1", "YOUR_SERVICE_KEY");
```

worldpay-sample-dotnet-3-5 & 2-0
-------------------

Expand All @@ -67,4 +64,4 @@ C# ASP .NET sample application which demonstrates integration with Worldpay API.
- In your account dashboard, navigate to Settings and API Keys and update the Web.config file in your solutions route folder with the corresponding value.
- Also in Web.config, set OrderLog to a location on your server which has read/write access permissions for your web server. In IIS on Windows, this usually means granting access to IUSR and IIS_IUSRS via the Windows Explorer folder properties dialog.
- Visual Studio users can now be able to run the application simply by opening the page 'CreateOrder.aspx' and clicking the 'run' button from the toolbar.
- To test credit card transactions via the IDE, simply fill out the details on the page and submit.
- To test credit card transactions via the IDE, simply fill out the details on the page and submit.
Empty file modified worldpay-lib-dotnet-2-0/.gitignore
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Identifier.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JavaScriptConvert.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonConverter.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonHandler.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonIgnoreAttribute.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonObjectAttribute.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonReader.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonReaderException.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonSerializer.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonTextReader.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonTextWriter.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonToken.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonWriter.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/JsonWriterException.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/Extensions.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/JArray.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/JConstructor.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/JContainer.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/JEnumerable.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/JObject.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/JProperty.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/JToken.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/JValue.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/JsonTokenReader.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/JsonTokenType.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Linq/JsonTokenWriter.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/LinqBridge.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/MemberMapping.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/MemberSerialization.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Newtonsoft.Json.csproj
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/NullValueHandling.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/StringBuffer.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/Utilities/MathUtils.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Binary file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/bin/Debug/Newtonsoft.Json.dll
100644 → 100755
Binary file not shown.
Empty file.
Empty file.
Binary file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/bin/Debug/Newtonsoft.Json.pdb
100644 → 100755
Binary file not shown.
Empty file.
Binary file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/bin/Release/Newtonsoft.Json.dll
100644 → 100755
Binary file not shown.
Binary file modified worldpay-lib-dotnet-2-0/Newtonsoft.Json/bin/Release/Newtonsoft.Json.pdb
100644 → 100755
Binary file not shown.
8 changes: 4 additions & 4 deletions worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/App.config
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<appSettings>
<add key="TokenUrl" value="https://api.worldpay.com/v1/tokens"/>
<add key="BaseUrl" value="https://api.worldpay.com/v1"/>
<add key="ServiceKey" value="T_S_cc7fa6da-2c00-4567-90f6-5da1d40618d1"/>
<add key="ClientKey" value="T_C_c7424f48-2b89-4736-b687-7751ab88927a"/>
<add key="MerchantId" value="6406251b-f8f9-4355-91d9-085283e86ddd"/>
<add key="WebhookUrl" value="[WebhookUrl]"/>
<add key="ServiceKey" value="T_S_4023fc55-903b-47c5-8d2c-ff73a4cd1cce"/>
<add key="ClientKey" value="T_C_564f850f-1f04-4211-afe7-0f792fd3d2dd"/>
<add key="MerchantId" value="01346fe3-86b7-40d4-9406-a4646e9fa520"/>
<add key="WebhookUrl" value="[PathToWebhookUrl]"/>
<add key="OrderLog" value="[PathToWebhookLogfile]"/>
</appSettings>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/OrderServiceTest.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/TestHelpers.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/TokenServiceTest.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/WebhookServiceTest.cs
100644 → 100755
Empty file.
Empty file.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/bin/Debug/Newtonsoft.Json.dll
100644 → 100755
Binary file not shown.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/bin/Debug/Newtonsoft.Json.pdb
100644 → 100755
Binary file not shown.
Empty file.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/bin/Debug/WorldPay.Sdk.Test.dll
100644 → 100755
Binary file not shown.
12 changes: 6 additions & 6 deletions worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/bin/Debug/WorldPay.Sdk.Test.dll.config
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="TokenUrl" value="https://api.worldpay.com/v1/tokens"/>
<add key="BaseUrl" value="https://api.worldpay.com/v1"/>
<add key="ServiceKey" value="T_S_cc7fa6da-2c00-4567-90f6-5da1d40618d1"/>
<add key="ClientKey" value="T_C_c7424f48-2b89-4736-b687-7751ab88927a"/>
<add key="MerchantId" value="6406251b-f8f9-4355-91d9-085283e86ddd"/>
<add key="WebhookUrl" value="[WebhookUrl]"/>
<add key="TokenUrl" value="https://qa02-api.worldpay.io/v1/tokens"/>
<add key="BaseUrl" value="https://qa02-api.worldpay.io/v1"/>
<add key="ServiceKey" value="T_S_4023fc55-903b-47c5-8d2c-ff73a4cd1cce"/>
<add key="ClientKey" value="T_C_564f850f-1f04-4211-afe7-0f792fd3d2dd"/>
<add key="MerchantId" value="01346fe3-86b7-40d4-9406-a4646e9fa520"/>
<add key="WebhookUrl" value="https://logger2.worldpaydemo.com/logger/log?server=qa&amp;statusCode=200"/>
<add key="OrderLog" value="[PathToWebhookLogfile]"/>
</appSettings>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/bin/Debug/WorldPay.Sdk.Test.pdb
100644 → 100755
Binary file not shown.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/bin/Debug/WorldPay.Sdk.dll
100644 → 100755
Binary file not shown.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk.Test/bin/Debug/WorldPay.Sdk.pdb
100644 → 100755
Binary file not shown.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk.sln
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/AbstractService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/App.config
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/AuthService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Configuration.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Enums/CountryCode.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Enums/CurrencyCode.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Enums/Environment.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Enums/OrderStatus.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Enums/OrderType.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Enums/RequestMethod.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Enums/WarningCode.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Http.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/MerchantService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/APMRequest.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/AbstractCard.cs
100644 → 100755
Empty file.
4 changes: 3 additions & 1 deletion worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/AbstractOrder.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ public class AbstractOrder

public string orderDescription { get; set; }

public int amount { get; set; }
public int? amount { get; set; }

public string currencyCode { get; set; }

public string settlementCurrency { get; set; }

public bool authorizeOnly { get; set; }

public int? authorizedAmount { get; set; }
Expand Down
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/AbstractPerson.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/Account.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/Address.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/ApiError.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/BaseMerchant.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/BusinessProfile.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/CaptureRequest.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/CardRequest.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/Company.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/DeliveryAddress.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/Entry.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/Merchant.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/Name.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/OrderHistory.cs
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/OrderRequest.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@ public string shopperAcceptHeader

public string shopperEmailAddress { get; set; }

public string statementNarrative { get; set; }

}
}
3 changes: 3 additions & 0 deletions worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/OrderResponse.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ public class OrderResponse : AbstractOrder
public string shopperEmailAddress { get; set; }

public DeliveryAddress deliveryAddress { get; set; }

public string statementNarrative { get; set; }

}
}
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/PaymentResponse.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/PersonContact.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/PersonRecord.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/RiskSetting.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/Setting.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/SettingsResponse.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/ThreeDSecureInfo.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/TokenRequest.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/TokenResponse.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/TransferDetail.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/TransferOrder.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/TransferResponse.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/TransferSummary.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/Warning.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Models/WebhookSetting.cs
100644 → 100755
Empty file.
13 changes: 10 additions & 3 deletions worldpay-lib-dotnet-2-0/Worldpay.Sdk/OrderService.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public OrderResponse CaptureAuthorizedOrder(string orderCode, int amount)
{
if (amount == 0)
{
return Http.Post<CaptureRequest, OrderResponse>(String.Format("{0}/orders/{1}/capture", _baseUrl, orderCode), null);
return CaptureAuthorizedOrder(orderCode);
}
else
{
Expand Down Expand Up @@ -111,8 +111,15 @@ public void Refund(String orderCode)
/// <param name="amount">The amount of the order to be partially refunded</param>
public void Refund(String orderCode, int amount)
{
PartialRefundRequest partialRefundRequest = new PartialRefundRequest { refundAmount = amount };
Http.Post(String.Format("{0}/orders/{1}/refund", _baseUrl, orderCode), partialRefundRequest);
if (amount == 0)
{
Refund(orderCode);
}
else
{
PartialRefundRequest partialRefundRequest = new PartialRefundRequest { refundAmount = amount };
Http.Post(String.Format("{0}/orders/{1}/refund", _baseUrl, orderCode), partialRefundRequest);
}
}
}
}
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Properties/AssemblyInfo.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/SettingsService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/TokenService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/TransferService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/WebhookHandler.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/WebhookService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/WorldPayException.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/WorldPayRestClient.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/Worldpay.Sdk.csproj
100644 → 100755
Empty file.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/bin/Debug/Newtonsoft.Json.dll
100644 → 100755
Binary file not shown.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/bin/Debug/Newtonsoft.Json.pdb
100644 → 100755
Binary file not shown.
Empty file.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/bin/Debug/WorldPay.Sdk.dll
100644 → 100755
Binary file not shown.
Empty file.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/bin/Debug/WorldPay.Sdk.pdb
100644 → 100755
Binary file not shown.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/bin/Release/Newtonsoft.Json.dll
100644 → 100755
Binary file not shown.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/bin/Release/Newtonsoft.Json.pdb
100644 → 100755
Binary file not shown.
Empty file.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/bin/Release/WorldPay.Sdk.dll
100644 → 100755
Binary file not shown.
Empty file.
Binary file modified worldpay-lib-dotnet-2-0/Worldpay.Sdk/bin/Release/WorldPay.Sdk.pdb
100644 → 100755
Binary file not shown.
Empty file modified worldpay-lib-dotnet-3-5/.gitignore
100644 → 100755
Empty file.
8 changes: 4 additions & 4 deletions worldpay-lib-dotnet-3-5/Worldpay.Sdk.Test/App.config
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<appSettings>
<add key="TokenUrl" value="https://api.worldpay.com/v1/tokens"/>
<add key="BaseUrl" value="https://api.worldpay.com/v1"/>
<add key="ServiceKey" value="T_S_cc7fa6da-2c00-4567-90f6-5da1d40618d1"/>
<add key="ClientKey" value="T_C_c7424f48-2b89-4736-b687-7751ab88927a"/>
<add key="MerchantId" value="6406251b-f8f9-4355-91d9-085283e86ddd"/>
<add key="WebhookUrl" value="[WebhookUrl]"/>
<add key="ServiceKey" value="T_S_4023fc55-903b-47c5-8d2c-ff73a4cd1cce"/>
<add key="ClientKey" value="T_C_564f850f-1f04-4211-afe7-0f792fd3d2dd"/>
<add key="MerchantId" value="01346fe3-86b7-40d4-9406-a4646e9fa520"/>
<add key="WebhookUrl" value="[PathToWebhookUrl]"/>
<add key="OrderLog" value="[PathToWebhookLogfile]"/>
</appSettings>
<startup>
Expand Down
6 changes: 3 additions & 3 deletions worldpay-lib-dotnet-3-5/Worldpay.Sdk.Test/OrderServiceTest.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ private OrderRequest createOrderRequest()
{
var orderRequest = new OrderRequest();
orderRequest.amount = 1999;
orderRequest.currencyCode = CurrencyCode.GBP;
orderRequest.currencyCode = "GBP";
orderRequest.name = "test name";
orderRequest.orderDescription = "test description";

Expand All @@ -297,7 +297,7 @@ private OrderRequest create3DSOrderRequest()
{
var orderRequest = new OrderRequest();
orderRequest.amount = 1999;
orderRequest.currencyCode = CurrencyCode.GBP;
orderRequest.currencyCode = "GBP";
orderRequest.name = "3D";
orderRequest.orderDescription = "test description";

Expand Down Expand Up @@ -336,7 +336,7 @@ private OrderRequest createAPMOrderRequest()
orderRequest.failureUrl = "http://www.testurl.com/failure";
orderRequest.pendingUrl = "http://www.testurl.com/pending";

orderRequest.currencyCode = CurrencyCode.GBP;
orderRequest.currencyCode = "GBP";
orderRequest.name = "Test";
orderRequest.orderDescription = "test description";
orderRequest.is3DSOrder = false;
Expand Down
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk.Test/TestHelpers.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk.Test/TokenServiceTest.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk.Test/WebhookServiceTest.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk.sln
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/AbstractService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/AuthService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Configuration.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Enums/CountryCode.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Enums/CurrencyCode.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Enums/Environment.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Enums/OrderStatus.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Enums/OrderType.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Enums/RequestMethod.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Enums/WarningCode.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Http.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Json/EntryConvertcs.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/MerchantService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/APMRequest.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/AbstractCard.cs
100644 → 100755
Empty file.
9 changes: 6 additions & 3 deletions worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/AbstractOrder.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ public class AbstractOrder
public string orderDescription { get; set; }

[DataMember]
public int amount { get; set; }
public int? amount { get; set; }

[DataMember, JsonConverter(typeof(StringEnumConverter))]
public CurrencyCode currencyCode { get; set; }
[DataMember]
public string currencyCode { get; set; }

[DataMember]
public string settlementCurrency { get; set; }

[DataMember]
public bool authorizeOnly { get; set; }
Expand Down
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/AbstractPerson.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/Account.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/Address.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/ApiError.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/BaseMerchant.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/BusinessProfile.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/CaptureRequest.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/CardRequest.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/Company.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/DeliveryAddress.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/Entry.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/Merchant.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/Name.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/OrderHistory.cs
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/OrderRequest.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,8 @@ public OrderRequest()
[DataMember]
public string shopperEmailAddress { get; set; }

[DataMember]
public string statementNarrative { get; set; }

}
}
3 changes: 3 additions & 0 deletions worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/OrderResponse.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@ public class OrderResponse : AbstractOrder
[DataMember]
public DeliveryAddress deliveryAddress { get; set; }

[DataMember]
public string statementNarrative { get; set; }

}
}
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/PaymentResponse.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/PersonContact.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/PersonRecord.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/RiskSetting.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/Setting.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/SettingsResponse.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/ThreeDSecureInfo.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/TokenRequest.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/TokenResponse.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/TransferDetail.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/TransferOrder.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/TransferResponse.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/TransferSummary.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/Warning.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Models/WebhookSetting.cs
100644 → 100755
Empty file.
13 changes: 10 additions & 3 deletions worldpay-lib-dotnet-3-5/Worldpay.Sdk/OrderService.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public OrderResponse CaptureAuthorizedOrder(string orderCode, int amount)
{
if (amount == 0)
{
return Http.Post<CaptureRequest, OrderResponse>(String.Format("{0}/orders/{1}/capture", _baseUrl, orderCode), null);
return CaptureAuthorizedOrder(orderCode);
}
else
{
Expand Down Expand Up @@ -111,8 +111,15 @@ public void Refund(String orderCode)
/// <param name="amount">The amount of the order to be partially refunded</param>
public void Refund(String orderCode, int amount)
{
PartialRefundRequest partialRefundRequest = new PartialRefundRequest { refundAmount = amount };
Http.Post(String.Format("{0}/orders/{1}/refund", _baseUrl, orderCode), partialRefundRequest);
if (amount == 0)
{
Refund(orderCode);
}
else
{
PartialRefundRequest partialRefundRequest = new PartialRefundRequest { refundAmount = amount };
Http.Post(String.Format("{0}/orders/{1}/refund", _baseUrl, orderCode), partialRefundRequest);
}
}
}
}
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Properties/AssemblyInfo.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/SettingsService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/TokenService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/TransferService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/WebhookHandler.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/WebhookService.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/WorldPayException.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/WorldPayRestClient.cs
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/Worldpay.Sdk.csproj
100644 → 100755
Empty file.
Empty file modified worldpay-lib-dotnet-3-5/Worldpay.Sdk/lib/Newtonsoft.Json.dll
100644 → 100755
Empty file.
Empty file modified worldpay-sample-dotnet-2-0/.gitignore
100644 → 100755
Empty file.
Empty file modified worldpay-sample-dotnet-2-0/Worldpay.Sdk.Examples/APMCancel.aspx
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion worldpay-sample-dotnet-2-0/Worldpay.Sdk.Examples/AuthorizeOrder.aspx.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected void Page_Load(object sender, EventArgs e)

protected void onAuthorizeOrder(object sender, CommandEventArgs e)
{
var client = new WorldpayRestClient(Configuration.ServiceKey);
var client = new WorldpayRestClient((string)Session["apiEndpoint"], (string)Session["service_key"]);

string orderCode = (string)Session["orderCode"];
var responseCode = HttpContext.Current.Request.Form["PaRes"];
Expand Down
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion worldpay-sample-dotnet-2-0/Worldpay.Sdk.Examples/CancelAuthorizedOrder.aspx.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected override void OnLoad(EventArgs e)
protected void OnCancelOrder(object sender, CommandEventArgs e)
{
var form = HttpContext.Current.Request.Form;
var client = new WorldpayRestClient(Configuration.ServiceKey);
var client = new WorldpayRestClient((string)Session["apiEndpoint"], (string)Session["service_key"]);

var orderCode = form["orderCode"];

Expand Down
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion worldpay-sample-dotnet-2-0/Worldpay.Sdk.Examples/CaptureAuthorizedOrder.aspx.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected override void OnLoad(EventArgs e)
protected void OnCaptureOrder(object sender, CommandEventArgs e)
{
var form = HttpContext.Current.Request.Form;
var client = new WorldpayRestClient(Configuration.ServiceKey);
var client = new WorldpayRestClient((string)Session["apiEndpoint"], (string)Session["service_key"]);

var orderCode = form["orderCode"];
var amount = 0;
Expand Down
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion worldpay-sample-dotnet-2-0/Worldpay.Sdk.Examples/ConfigurationService.asmx.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ConfigurationService : WebService
[WebMethod(EnableSession = true)]
public string Test(string apiEndpoint, string jsEndpoint, string serviceKey, string clientKey)
{
Session["apiendpoint"] = apiEndpoint;
Session["apiEndpoint"] = apiEndpoint;
Session["js_endpoint"] = jsEndpoint;
Session["service_key"] = serviceKey;
Session["client_key"] = clientKey;
Expand Down
16 changes: 15 additions & 1 deletion worldpay-sample-dotnet-2-0/Worldpay.Sdk.Examples/CreateOrder.aspx
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<label>Order Type</label>
<select id="orderType" name="orderType">
<option value="ECOM" selected="selected">ECOM</option>
<option value="RECURRING">RECURRING</option>
<option value="MOTO">MOTO</option>
<option value="APM">APM</option>
</select>
Expand Down Expand Up @@ -111,6 +110,21 @@
<input type="text" id="currency" name="currency" value="GBP" />
</div>

<div class="form-row">
<label>Settlement Currency</label>
<select id="settlement-currency" name="settlement-currency">
<option value="" selected></option>
<option value="USD">USD</option>
<option value="GBP">GBP</option>
<option value="EUR">EUR</option>
<option value="CAD">CAD</option>
<option value="NOK">NOK</option>
<option value="SEK">SEK</option>
<option value="SGD">SGD</option>
<option value="HKD">HKD</option>
<option value="DKK">DKK</option>
</select>
</div>

<div class="form-row reusable-token-row">
<label>Reusable Token</label>
Expand Down
Loading

0 comments on commit d317ac9

Please sign in to comment.