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
[ | |
{ | |
"id": 329441, | |
"order_id": 239344, | |
"product_id": 1180, | |
"variant_id": 10703, | |
"order_address_id": 237073, | |
"name": "Abena Boost Booster Pads", | |
"sku": "4035-BG20", // "BG" == McKesson UOM | |
"upc": "796433843368", |
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
{ | |
"b2b_key": "mZ... <**--removed--**>", | |
"bill_to_name": "Carewell", | |
"developer_account": "<**--removed--**>", | |
"identity": "CA... <**--removed--**>", | |
"shared_secret": "Bf... <**--removed--**>", | |
"ship_to_address": { | |
"name": "Jan<**--removed--**>", | |
"street": "61<**--removed--**>", | |
"street_line_3": "", |
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
# Copy and paste this into terminal | |
curl "https://api.postmarkapp.com/email/withTemplate" \ | |
-X POST \ | |
-H "Accept: application/json" \ | |
-H "Content-Type: application/json" \ | |
-H "X-Postmark-Server-Token: TOKEN" \ | |
-d '{ | |
"From": "[email protected]", | |
"To": "[email protected]", | |
"TemplateAlias": "receipt", |
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
# Copy and paste this into terminal | |
curl "https://api.postmarkapp.com/email/withTemplate" \ | |
-X POST \ | |
-H "Accept: application/json" \ | |
-H "Content-Type: application/json" \ | |
-H "X-Postmark-Server-Token: TOKEN" \ | |
-d '{ | |
"From": "[email protected]", | |
"To": "[email protected]", | |
"TemplateAlias": "receipt", |
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
var mail = "[email protected]"; | |
//username is public API Key | |
var url = "https://bpi.briteverify.com/emails.json?address="+mail+"&username="; | |
$.ajax({ | |
url: url, | |
dataType: "jsonp", | |
success: function(data){ | |
var status = data.status; | |
if(status === 'valid') { | |
console.log('success') |
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
def address_verification(order) | |
shipping = Bigcommerce.find_shipping(order.id).first | |
address = verify_address(shipping) | |
unless address['deliverability'] == 'deliverable' || | |
address['deliverability'] == 'deliverable_unnecessary_unit' | |
notes = order.staff_notes + "\n" + footnotes(address) | |
Bigcommerce.update_staff_notes(order.id, notes) | |
Bigcommerce.update_order_status_id(order.id, ENV['manual_verification']) | |
end |
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
/* 1. Open HTML Editor | |
2. Search for (Ctrl/Command + F) "description-table-responsive" | |
3. Delete everything above that line | |
4. Copy the following code | |
5. Close HTML Editor | |
6. Edit using normal editor such as adding bullet points using the bullet point button. | |
*/ | |
<div class="description-container"> | |
<div class="row description-row"> | |
<div class="col-md-8 col-sm-12 description-section-1"> |
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
# lib/custom_logger.rb | |
class CustomLogger < Logger | |
def format_message(severity, timestamp, progname, msg) | |
"#{timestamp.to_formatted_s(:db)} #{severity} #{msg}\n" | |
end | |
end | |
logfile = File.open("#{Rails.root}/log/custom.log", 'a') # create log file | |
logfile.sync = true # automatically flushes data to file | |
CUSTOM_LOGGER = CustomLogger.new(logfile) # constant accessible anywhere |
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
class ApplicationController < ActionController::Base | |
# Prevent CSRF attacks by raising an exception. | |
# For APIs, you may want to use :null_session instead. | |
protect_from_forgery with: :exception | |
after_action :set_header_for_iframe | |
helper_method :current_store | |
helper_method :current_connection | |
private |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" style="background:#f9f9f9!important"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>{{subject}}</title> | |
<style> |
NewerOlder