View index.html
This file contains 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
<html> | |
<head> | |
<title>Test</title> | |
</head> | |
<body> | |
<span> Hostname : </span><span id="hostname">Hostname</span> | |
</body> | |
<script> | |
item = document.getElementById('hostname'); | |
item.innerText = window.location.hostname |
View woocommerce-order-update-event-sample-labmda.json
This file contains 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
{ | |
"headers": { | |
"X-WC-Webhook-Signature": "errtu1XQr0dm48Yz3ufiVvCgrcu2kin+H7WYQQ8Y0fE=" | |
}, | |
"body": "{\"status\":\"completed\",\"billing\":{\"first_name\":\"Jamy\",\"last_name\":\"\",\"company\":\"\",\"address_1\":\"\",\"address_2\":\"\",\"city\":\"\",\"state\":\"\",\"postcode\":\"\",\"country\":\"\",\"email\":\"jamy@example.com\",\"phone\":\"0888889999\"},\"customer_note\":\"\",\"line_items\":[{\"id\":90,\"name\":\"่Item-1 Sample Produc\",\"product_id\":23,\"variation_id\":0,\"quantity\":1,\"tax_class\":\"\",\"subtotal\":\"200.00\",\"subtotal_tax\":\"0.00\",\"total\":\"200.00\",\"total_tax\":\"0.00\",\"taxes\":[],\"meta_data\":[],\"sku\":\"\",\"price\":200,\"parent_name\":null}]}" | |
} |
View woocommerce-webhook-order-update.js
This file contains 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
const crypto = require('crypto'); | |
function validateRequest (event) { | |
// GET Secret from Environment Variable | |
const { WC_SECRET } = process.env; | |
// Get Header with Hash to validate from header (event.header) | |
const wc_hmac_hash = event.headers ? | |
event.headers['X-WC-Webhook-Signature'] || event.headers['x-wc-webhook-signature'] | |
: ""; |
View woocommerce-webhook
This file contains 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
{ | |
id: 1, | |
parent_id: 0, | |
status: 'completed', | |
currency: 'USD', | |
version: '5.6.0', | |
prices_include_tax: false, | |
date_created: '2021-08-25T14:58:07', | |
date_modified: '2021-08-25T15:00:13', | |
discount_total: '0.00', |
View update-window-timezone.config
This file contains 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
################################################################################################### | |
#### This configuration file runs a PowerShell script that modifies the Windows timezone | |
#### | |
#### Original Author: @kylegalbraith | |
#### https://github.com/awsdocs/elastic-beanstalk-samples/blob/master/configuration-files/community-provided/instance-configuration/enable-windowsupdate-dotnet.config | |
#### Modifier: @teer823 | |
################################################################################################### | |
files: | |
"c:/temp/configureTimezone.ps1": |