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
/** | |
* @NApiVersion 2.x | |
* @NScriptType Restlet | |
* @NModuleScope SameAccount | |
*/ | |
define(['N/search', 'N/record'], | |
/** | |
* @param {search} search | |
* @param {record} record | |
*/ |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<appSettings> | |
<add key="AppId" value="your_app_id" /> | |
<add key="AppSecret" value="your_app_secret" /> | |
<add key="AppScope" value="read_orders,write_orders" /> | |
</appSettings> |
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
private static void CreateFolder(string folderName,DriveService service) | |
{ | |
var fileMetadata = new Google.Apis.Drive.v3.Data.File() | |
{ | |
Name = folderName, | |
MimeType = "application/vnd.google-apps.folder" | |
}; | |
var request = service.Files.Create(fileMetadata); | |
request.Fields = "id"; | |
var file = request.Execute(); |
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
public bool IsAuthenticWebhook(NameValueCollection requestHeaders, string requestBody, string shopifySecretKey) | |
{ | |
string hmacHeader = requestHeaders.Get("X-Shopify-Hmac-SHA256"); | |
if (string.IsNullOrEmpty(hmacHeader)) | |
{ | |
return false; | |
} | |
HMACSHA256 hmac = new HMACSHA256(Encoding.UTF8.GetBytes(shopifySecretKey)); |
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
public class BackupService | |
{ | |
private readonly string _connectionString; | |
private readonly string _backupFolderFullPath; | |
private readonly string[] _systemDatabaseNames = { "master", "tempdb", "model", "msdb" }; | |
public BackupService(string connectionString, string backupFolderFullPath) | |
{ | |
_connectionString = connectionString; | |
_backupFolderFullPath = backupFolderFullPath; |
NewerOlder