Skip to content

Commit f0bc99f

Browse files
committed
Branding updates & account notification error
1 parent 8d87d67 commit f0bc99f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+142
-114
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
function CurrencyController($scope, umbracoFormsIntegrationsCommerceEMerchantPayResource) {
1+
function CurrencyController($scope, umbracoFormsIntegrationsCommerceEmerchantpayResource) {
22

33
var vm = this;
44

55
if ($scope.setting && $scope.setting.value) vm.selectedCurrency = $scope.setting.value;
66

7-
umbracoFormsIntegrationsCommerceEMerchantPayResource.getCurrencies().then(function (response) {
7+
umbracoFormsIntegrationsCommerceEmerchantpayResource.getCurrencies().then(function (response) {
88
vm.currencies = response;
99
});
1010

@@ -14,4 +14,4 @@
1414
}
1515

1616
angular.module("umbraco")
17-
.controller("UmbracoForms.Integrations.Commerce.eMerchantPay.CurrencyController", CurrencyController);
17+
.controller("UmbracoForms.Integrations.Commerce.emerchantpay.CurrencyController", CurrencyController);

src/Umbraco.Forms.Integrations.Commerce.EMerchantPay/App_Plugins/UmbracoForms.Integrations/Commerce/eMerchantPay/currency.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-controller="UmbracoForms.Integrations.Commerce.eMerchantPay.CurrencyController as vm">
1+
<div ng-controller="UmbracoForms.Integrations.Commerce.emerchantpay.CurrencyController as vm">
22

33
<div>
44
<select ng-model="vm.selectedCurrency" ng-click="vm.saveCurrency()">

src/Umbraco.Forms.Integrations.Commerce.EMerchantPay/App_Plugins/UmbracoForms.Integrations/Commerce/eMerchantPay/customer-details-mapper.controller.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function CustomerDetailsMapperController($scope, notificationsService, emerchantpayService, umbracoFormsIntegrationsCommerceEMerchantPayResource) {
1+
function CustomerDetailsMapperController($scope, notificationsService, emerchantpayService, umbracoFormsIntegrationsCommerceEmerchantpayResource) {
22

33
var vm = this;
44

@@ -32,13 +32,25 @@
3232

3333
function init() {
3434

35-
umbracoFormsIntegrationsCommerceEMerchantPayResource.getAvailableMappingFields().then(function (response) {
35+
umbracoFormsIntegrationsCommerceEmerchantpayResource.isAccountAvailable().then(function (response) {
36+
if (response === "UNAVAILABLE") {
37+
notificationsService.add({
38+
headline: "emerchantpay",
39+
message: "Account details are missing. Please create an account before continuing",
40+
type: "error",
41+
sticky: true,
42+
url: "https://www.emerchantpay.com/"
43+
});
44+
}
45+
});
46+
47+
umbracoFormsIntegrationsCommerceEmerchantpayResource.getAvailableMappingFields().then(function (response) {
3648
vm.customerProperties = response;
3749
});
3850

3951
vm.fields = [];
4052

41-
umbracoFormsIntegrationsCommerceEMerchantPayResource.getRequiredMappingFields().then(function (response) {
53+
umbracoFormsIntegrationsCommerceEmerchantpayResource.getRequiredMappingFields().then(function (response) {
4254
vm.requiredFields = response.join();
4355
});
4456

@@ -56,4 +68,4 @@
5668
}
5769

5870
angular.module("umbraco")
59-
.controller("UmbracoForms.Integrations.Commerce.eMerchantPay.CustomerDetailsMapperController", CustomerDetailsMapperController);
71+
.controller("UmbracoForms.Integrations.Commerce.emerchantpay.CustomerDetailsMapperController", CustomerDetailsMapperController);

src/Umbraco.Forms.Integrations.Commerce.EMerchantPay/App_Plugins/UmbracoForms.Integrations/Commerce/eMerchantPay/customer-details-mapper.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-controller="UmbracoForms.Integrations.Commerce.eMerchantPay.CustomerDetailsMapperController as vm">
1+
<div ng-controller="UmbracoForms.Integrations.Commerce.emerchantpay.CustomerDetailsMapperController as vm">
22

33
<div>
44
<select ng-model="vm.selectedCustomerProperty">

src/Umbraco.Forms.Integrations.Commerce.EMerchantPay/App_Plugins/UmbracoForms.Integrations/Commerce/eMerchantPay/emerchantpay.resource.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
function eMerchantPayResource($http, umbRequestHelper) {
1+
function emerchantpayResource($http, umbRequestHelper) {
22

3-
const apiEndpoint = "backoffice/UmbracoFormsIntegrationsCommerceEmerchantPay/EmerchantPay";
3+
const apiEndpoint = "backoffice/UmbracoFormsIntegrationsCommerceEmerchantpay/emerchantpay";
44

55
return {
6+
isAccountAvailable: function () {
7+
return umbRequestHelper.resourcePromise(
8+
$http.get(`${apiEndpoint}/IsAccountAvailable`),
9+
"Failed to get resource");
10+
},
611
getCurrencies: function () {
712
return umbRequestHelper.resourcePromise(
813
$http.get(`${apiEndpoint}/GetCurrencies`),
@@ -21,4 +26,4 @@
2126
};
2227
}
2328

24-
angular.module('umbraco.resources').factory('umbracoFormsIntegrationsCommerceEMerchantPayResource', eMerchantPayResource);
29+
angular.module('umbraco.resources').factory('umbracoFormsIntegrationsCommerceEmerchantpayResource', emerchantpayResource);

src/Umbraco.Forms.Integrations.Commerce.EMerchantPay/App_Plugins/UmbracoForms.Integrations/Commerce/eMerchantPay/field-picker.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
}
2222

2323
angular.module("umbraco")
24-
.controller("UmbracoForms.Integrations.Commerce.eMerchantPay.FieldPickerController", FieldPickerController);
24+
.controller("UmbracoForms.Integrations.Commerce.emerchantpay.FieldPickerController", FieldPickerController);

src/Umbraco.Forms.Integrations.Commerce.EMerchantPay/App_Plugins/UmbracoForms.Integrations/Commerce/eMerchantPay/field-picker.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-controller="UmbracoForms.Integrations.Commerce.eMerchantPay.FieldPickerController as vm">
1+
<div ng-controller="UmbracoForms.Integrations.Commerce.emerchantpay.FieldPickerController as vm">
22

33
<div>
44
<select ng-model="vm.selectedField" ng-click="vm.saveField()">
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"javascript": [
3-
"~/App_Plugins/UmbracoForms.Integrations/Commerce/eMerchantPay/customer-details-mapper.controller.js",
4-
"~/App_Plugins/UmbracoForms.Integrations/Commerce/eMerchantPay/currency.controller.js",
5-
"~/App_Plugins/UmbracoForms.Integrations/Commerce/eMerchantPay/emerchantpay.resource.js",
6-
"~/App_Plugins/UmbracoForms.Integrations/Commerce/eMerchantPay/emerchantpay.service.js",
7-
"~/App_Plugins/UmbracoForms.Integrations/Commerce/eMerchantPay/field-picker.controller.js"
3+
"~/App_Plugins/UmbracoForms.Integrations/Commerce/emerchantpay/customer-details-mapper.controller.js",
4+
"~/App_Plugins/UmbracoForms.Integrations/Commerce/emerchantpay/currency.controller.js",
5+
"~/App_Plugins/UmbracoForms.Integrations/Commerce/emerchantpay/emerchantpay.resource.js",
6+
"~/App_Plugins/UmbracoForms.Integrations/Commerce/emerchantpay/emerchantpay.service.js",
7+
"~/App_Plugins/UmbracoForms.Integrations/Commerce/emerchantpay/field-picker.controller.js"
88
],
99
"css": [ "" ]
1010
}

src/Umbraco.Forms.Integrations.Commerce.EMerchantPay/Builders/MappingBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
using System.Linq;
44

55
using Umbraco.Forms.Core.Persistence.Dtos;
6-
using Umbraco.Forms.Integrations.Commerce.EMerchantPay.Models.Dtos;
6+
using Umbraco.Forms.Integrations.Commerce.Emerchantpay.Models.Dtos;
77

8-
namespace Umbraco.Forms.Integrations.Commerce.EMerchantPay.Builders
8+
namespace Umbraco.Forms.Integrations.Commerce.Emerchantpay.Builders
99
{
1010
public class MappingBuilder
1111
{

src/Umbraco.Forms.Integrations.Commerce.EMerchantPay/Configuration/ISettingsParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Collections.Generic;
22

3-
namespace Umbraco.Forms.Integrations.Commerce.EMerchantPay.Configuration
3+
namespace Umbraco.Forms.Integrations.Commerce.Emerchantpay.Configuration
44
{
55
public interface ISettingsParser
66
{

0 commit comments

Comments
 (0)