This file contains hidden or 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
/** | |
* Filename: FACPaymentUtils.js | |
* Created by: xerosai @ 22/07/2020 11:10 AM | |
* @author: Simon Neufville <[email protected]> | |
*/ | |
const axios = require('axios'); | |
const CryptoJS = require('crypto-js'); | |
const xmlJS = require('xml-js'); | |
const xml2js = require('xml2js'); |
This file contains hidden or 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
/** | |
* Given a string, validates an email address | |
* @param {String} emailString: the user submitted email address | |
* @returns {Boolean} true/false: indicates if the email address is valid or not | |
* */ | |
const isEmailAddressValid = (emailString) => { | |
const regExpStr = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
return regExpStr.test(emailString); | |
}; |
This file contains hidden or 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
{% comment %} | |
Created by: Simon Neufville | |
Generic HTML section that can be placed anywhere in the customizer. | |
{% endcomment %} | |
<div class="shopify-section" data-section-id="{{ section.id }}"> | |
{% if section.settings.heading %} | |
<h4 class="section-title">{{ section.settings.heading }}</h2> | |
{% endif %} | |
<div> |
This file contains hidden or 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
import Vue from 'vue'; | |
const SPACE_CHAR = ' '; | |
const TEXT_REQUIRED = 'Specify text to be converted to Title Case'; | |
Vue.filter('convertToTitleCase', (value) => { | |
if (!value) return TEXT_REQUIRED; | |
return value.toString().split(SPACE_CHAR).map((word) => { |
This file contains hidden or 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
/* | |
* Date Format related filters that can be used anywhere (registered globally) in the project | |
* Import this into your main.js the root of the src directory | |
* */ | |
import Vue from 'vue'; | |
import moment from 'moment'; | |
Vue.filter('formatToISODate', (value) => { | |
if (!value) return 'Specify a date to be converted'; |