Skip to content

Commit fcb3af5

Browse files
authored
Upgrade to commerce v14 (#10)
* Upgrade to commerce v14 * fine tuning v14 * remove packages.lock.json
1 parent b56b2db commit fcb3af5

File tree

11 files changed

+74
-1256
lines changed

11 files changed

+74
-1256
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,3 +480,4 @@ $RECYCLE.BIN/
480480
## Umbraco Commerce specific
481481
##
482482
/src/Umbraco.Commerce.PaymentProviders.Quickpay/packages.lock.json
483+
tests/Umbraco.Commerce.PaymentProviders.Quickpay.UnitTests/packages.lock.json

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<ItemGroup>
1313
<PackageVersion Include="Flurl.Http" Version="[4.0.0, 5)" />
1414
<PackageVersion Include="Flurl.Http.Newtonsoft" Version="[0.9.0, 1)" />
15-
<PackageVersion Include="Umbraco.Commerce.Core" Version="[13.0.0, 14)" />
15+
<PackageVersion Include="Umbraco.Commerce.Core" Version="[14.0.0--beta2.preview.501.gc4c8b29, 15)" />
1616
<PackageVersion Include="Microsoft.AspNet.WebApi.Client" Version="[6, 7)" />
1717
</ItemGroup>
1818
</Project>

src/Umbraco.Commerce.PaymentProviders.Quickpay/QuickpayCheckoutPaymentProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
namespace Umbraco.Commerce.PaymentProviders.Quickpay
2020
{
21-
[PaymentProvider("quickpay-v10-checkout", "Quickpay V10", "Quickpay V10 payment provider for one time payments")]
21+
[PaymentProvider("quickpay-v10-checkout")]
2222
public class QuickpayCheckoutPaymentProvider : QuickpayPaymentProviderBase<QuickpayCheckoutPaymentProvider, QuickpayCheckoutSettings>
2323
{
2424
private const string QuickpayStatusCodeApproved = "20000";

src/Umbraco.Commerce.PaymentProviders.Quickpay/QuickpayCheckoutSettings.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@ namespace Umbraco.Commerce.PaymentProviders.Quickpay
44
{
55
public class QuickpayCheckoutSettings : QuickpaySettingsBase
66
{
7-
[PaymentProviderSetting(Name = "Auto Fee",
8-
Description = "Flag indicating whether to automatically calculate and apply the fee from the acquirer.",
7+
[PaymentProviderSetting(
98
SortOrder = 1100)]
109
public bool AutoFee { get; set; }
1110

12-
[PaymentProviderSetting(Name = "Auto Capture",
13-
Description = "Flag indicating whether to immediately capture the payment, or whether to just authorize the payment for later (manual) capture.",
11+
[PaymentProviderSetting(
1412
SortOrder = 1200)]
1513
public bool AutoCapture { get; set; }
1614

17-
[PaymentProviderSetting(Name = "Framed",
18-
Description = "Flag indicating whether to allow opening payment page in iframe.",
15+
[PaymentProviderSetting(
1916
SortOrder = 1300)]
2017
public bool Framed { get; set; }
2118
}

src/Umbraco.Commerce.PaymentProviders.Quickpay/QuickpaySettings.cs

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/Umbraco.Commerce.PaymentProviders.Quickpay/QuickpaySettingsBase.cs

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,39 @@ namespace Umbraco.Commerce.PaymentProviders.Quickpay
44
{
55
public class QuickpaySettingsBase
66
{
7-
[PaymentProviderSetting(Name = "Continue URL",
8-
Description = "The URL to continue to after this provider has done processing. eg: /continue/",
7+
[PaymentProviderSetting(
98
SortOrder = 100)]
109
public string ContinueUrl { get; set; }
1110

12-
[PaymentProviderSetting(Name = "Cancel URL",
13-
Description = "The URL to return to if the payment attempt is canceled. eg: /cancel/",
11+
[PaymentProviderSetting(
1412
SortOrder = 200)]
1513
public string CancelUrl { get; set; }
1614

17-
[PaymentProviderSetting(Name = "Error URL",
18-
Description = "The URL to return to if the payment attempt errors. eg: /error/",
15+
[PaymentProviderSetting(
1916
SortOrder = 300)]
2017
public string ErrorUrl { get; set; }
2118

22-
[PaymentProviderSetting(Name = "API Key",
23-
Description = "API Key from the Quickpay administration portal.",
19+
[PaymentProviderSetting(
2420
SortOrder = 400)]
2521
public string ApiKey { get; set; }
2622

27-
[PaymentProviderSetting(Name = "Private Key",
28-
Description = "Private Key from the Quickpay administration portal.",
23+
[PaymentProviderSetting(
2924
SortOrder = 500)]
3025
public string PrivateKey { get; set; }
3126

32-
[PaymentProviderSetting(Name = "Merchant ID",
33-
Description = "Merchant ID supplied by Quickpay during registration.",
27+
[PaymentProviderSetting(
3428
SortOrder = 600)]
3529
public string MerchantId { get; set; }
3630

37-
[PaymentProviderSetting(Name = "Agreement ID",
38-
Description = "Agreement ID supplied by Quickpay during registration.",
31+
[PaymentProviderSetting(
3932
SortOrder = 700)]
4033
public string AgreemendId { get; set; }
4134

42-
[PaymentProviderSetting(Name = "Language",
43-
Description = "The language of the payment portal to display.",
35+
[PaymentProviderSetting(
4436
SortOrder = 900)]
4537
public string Lang { get; set; }
4638

47-
[PaymentProviderSetting(Name = "Accepted Payment Methods",
48-
Description = "A comma separated list of Payment Methods to accept. To use negation just put a \"!\" in front the those you do not wish to accept.",
39+
[PaymentProviderSetting(
4940
SortOrder = 1000)]
5041
public string PaymentMethods { get; set; }
5142
}

src/Umbraco.Commerce.PaymentProviders.Quickpay/Umbraco.Commerce.PaymentProviders.Quickpay.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
44
<Title>Umbraco Commerce Quickpay Payment Provider</Title>
55
<Description>Quickpay payment provider for Umbraco Commerce</Description>
6+
<StaticWebAssetBasePath>App_Plugins/UmbracoCommerceQuickpayPaymentProvider</StaticWebAssetBasePath>
67
</PropertyGroup>
78

89
<ItemGroup>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
export default {
2+
ucPaymentProviders: {
3+
'quickpayV10CheckoutLabel': 'Quickpay V10',
4+
'quickpayV10CheckoutDescription': 'Quickpay V10 payment provider for one time payments',
5+
'quickpayV10CheckoutSettingsContinueUrlLabel': 'Continue URL',
6+
'quickpayV10CheckoutSettingsContinueUrlDescription': 'The URL to continue to after this provider has done processing. eg: /continue/',
7+
'quickpayV10CheckoutSettingsCancelUrlLabel': 'Cancel URL',
8+
'quickpayV10CheckoutSettingsCancelUrlDescription': 'The URL to return to if the payment attempt is canceled. eg: /cart/',
9+
'quickpayV10CheckoutSettingsErrorUrlLabel': 'Error URL',
10+
'quickpayV10CheckoutSettingsErrorUrlDescription': 'The URL to return to if the payment attempt errors. eg: /error/',
11+
12+
'quickpayV10CheckoutSettingsApiKeyLabel': 'API Key',
13+
'quickpayV10CheckoutSettingsApiKeyDescription': 'API Key from the Quickpay administration portal',
14+
15+
'quickpayV10CheckoutSettingsPrivateKeyLabel': 'Private Key',
16+
'quickpayV10CheckoutSettingsPrivateKeyDescription': 'Private Key from the Quickpay administration portal',
17+
18+
'quickpayV10CheckoutSettingsMerchantIdLabel': 'Merchant ID',
19+
'quickpayV10CheckoutSettingsMerchantIdDescription': 'Merchant ID supplied by Quickpay during registration',
20+
21+
'quickpayV10CheckoutSettingsAgreemendIdLabel': 'Agreement ID',
22+
'quickpayV10CheckoutSettingsAgreemendIdDescription': 'Agreement ID supplied by Quickpay during registration',
23+
24+
'quickpayV10CheckoutSettingsLangLabel': 'Language',
25+
'quickpayV10CheckoutSettingsLangDescription': 'The language of the payment portal to display',
26+
27+
'quickpayV10CheckoutSettingsPaymentMethodsLabel': 'Accepted Payment Methods',
28+
'quickpayV10CheckoutSettingsPaymentMethodsDescription': 'A comma separated list of Payment Methods to accept. To use negation just put a "!" in front the those you do not wish to accept',
29+
30+
'quickpayV10CheckoutSettingsAutoFeeLabel': 'Auto Fee',
31+
'quickpayV10CheckoutSettingsAutoFeeDescription': 'Flag indicating whether to automatically calculate and apply the fee from the acquirer',
32+
33+
'quickpayV10CheckoutSettingsAutoCaptureLabel': 'Auto Capture',
34+
'quickpayV10CheckoutSettingsAutoCaptureDescription': 'Flag indicating whether to immediately capture the payment, or whether to just authorize the payment for later (manual) capture',
35+
36+
'quickpayV10CheckoutSettingsFramedLabel': 'Framed',
37+
'quickpayV10CheckoutSettingsFramedDescription': 'Flag indicating whether to allow opening payment page in iframe',
38+
},
39+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "Umbraco Commerce Quickpay Payment Provider",
3+
"$schema": "../umbraco-package-schema.json",
4+
"extensions": [
5+
{
6+
"type": "localization",
7+
"alias": "UmbracoCommerce.PaymentProviders.Quickpay.Localization.En_US",
8+
"weight": -100,
9+
"name": "English (US)",
10+
"meta": {
11+
"culture": "en-us"
12+
},
13+
"js": "/App_Plugins/UmbracoCommerceQuickpayPaymentProvider/lang/en-us.js"
14+
}
15+
],
16+
"version": ""
17+
}

0 commit comments

Comments
 (0)