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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Pay Here</title> | |
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> | |
</head> | |
<body class="font-sans"> | |
<header class="bg-white shadow-sm"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Embed Test Site</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style type="text/css"> | |
.container { | |
margin: 4rem auto; |
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 https = require("https") | |
const fetch = require("isomorphic-fetch") | |
const Account = require("./models/account") | |
const authenticated = require("./lib/auth") | |
exports.handler = authenticated(async (event, context) => { | |
const { id: shopId, shopifyToken } = context.account | |
try { | |
const resp = await fetch(`https://${shopId}/admin/api/2019-07/graphql.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
const Account = require("../models/account") | |
module.exports = (handler) => async (event, context) => { | |
let auth = event.headers.authorization | |
auth = auth.replace(/^Basic\s/, "") | |
auth = Buffer.from(auth, 'base64').toString() | |
const [id, token] = auth.split(":") | |
const account = await Account.get({ id }) |
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") | |
const querystring = require("querystring") | |
const fetch = require("isomorphic-fetch") | |
const Account = require("./models/account") | |
exports.handler = async (event, context) => { | |
const { shop, hmac, code, timestamp } = event.queryStringParameters | |
const apiKey = process.env.SHOPIFY_API_KEY | |
const apiSecret = process.env.SHOPIFY_API_SECRET |
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
exports.handler = async (event, context) => { | |
const shop = event.queryStringParameters.shop | |
const redirectUri = event.queryStringParameters.redirect | |
const apiKey = process.env.SHOPIFY_API_KEY | |
const scopes="read_content,write_content,read_products,read_themes,write_themes" | |
if (shop) { | |
const installUrl = 'https://' + shop + | |
'/admin/oauth/authorize?client_id=' + apiKey + | |
'&scope=' + scopes + |
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
module Events | |
class PayhereWebhooksController < ApplicationController | |
skip_before_action :authenticate_user! | |
skip_before_action :verify_authenticity_token | |
def create | |
return head 401 unless valid_signature? | |
if payment_params[:status] == "success" | |
user = find_or_create_user |
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
<button data-payhere-embed="https://payhere.co/altlabs/membership/pro-plan">Subscribe now</button> | |
<script src="https://payhere.co/embed/embed.js"></script> |
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
import AppKit | |
import QuickLook | |
extension NSImage { | |
static func previewForFile(path fileURL: URL, ofSize size: CGSize, asIcon: Bool) -> NSImage? { | |
let dict = [ | |
kQLThumbnailOptionIconModeKey: NSNumber(booleanLiteral: asIcon) | |
] as CFDictionary | |
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
<%= page_title("Account") %> | |
<%= render 'my_account/shared/header', current_section: "rewards" %> | |
<div class="container"> | |
<div class="tab-content"> | |
<div class="grid"> | |
<div class="col-2-3"> | |
<h3 class="heading">Bonus Points <span>2/8 bonus points earned</span></h3> | |
<p>Get even greater value from your rewards points by redeeming them against these special offers below. These offers are a one time only use and only unlock as and when you reach the Rewards Level required to do so.</p> |
NewerOlder