Skip to content

Instantly share code, notes, and snippets.

Working from home

Shan shanwixcode

Working from home
View GitHub Profile
shanwixcode / Corvid & Wix Gallery
Last active Aug 22, 2019
Code to load data into Wix Gallery using a Dataset
View Corvid & Wix Gallery
shanwixcode / Google & Outlook Calendar Event
Created Aug 31, 2019
Save The Date For Google & Outlook Calendar
View Google & Outlook Calendar Event
//Google Calendar Event's+day+session+is+from+10+AM+to+3+PM.+The+event's+evening+session+is+from+5+PM+to+10+PM.&location=The+Rooftop+at+Pier+17+89+South+Street+NY,+NY+10038+USA&ctz=America/New_York
//Outlook Calendar Event's+day+session+is+from+10+AM+to+3+PM.+The+event's+evening+session+is+from+5+PM+to+10+PM.&location=The+Rooftop+at+Pier+17+89+South+Street+NY,+NY+10038+USA
shanwixcode / stripe.js
Created Jan 20, 2020
Stripe Tutorial - Dude Lemon
View stripe.js
import {fetch} from 'wix-fetch';
const apiKey = "pk_test_xxxxxx"; //Stripe Public API Key
export async function stripeToken(cardObject) {
let values = encodeCard(cardObject);
View http-functions.js
import {ok, created, serverError, response} from 'wix-http-functions';
import {capturePayment} from 'backend/payPal.jsw';
import wixData from 'wix-data';
export function post_payPal(request) {
let options = {
"headers": {
"Content-Type": "application/json"
View Wix Users API Error
function signUpMember(response, cus, lastFour, brand, sourceData, referrer, donationValue) {
let email = $w("#email").value.toLowerCase();
let password = $w("#password").value;
let fname = $w("#fName").value;
let lname = $w("#lName").value;
registration(email, password, fname, lname)
.then( (res) => {
if(res.status === 'Active') {
View mcPage.rb
import wixData from 'wix-data';
import wixUsers from 'wix-users';
export function dataset2_ready() {
$w("#forex").value = 'USD';
export function repeater1_itemReady($item, itemData, index) {
$item("#price").text = "USD " + itemData.price;
View mcck.rb
import wixUsers from 'wix-users';
import wixData from 'wix-data';
import {createMyPayment} from 'backend/wixPay.jsw';
import wixPay from 'wix-pay';
$w.onReady(function () {
let user =;
.eq('userId', user)
View mcbck.rb
import wixPay from 'wix-pay-backend';
export function createMyPayment(products, amt, cry) {
return wixPay.createPayment({
items: products,
amount: amt,
currency: cry
View payPal.rb
import {fetch} from 'wix-fetch';
export async function getAccess() {
const response = await fetch("", {
method: 'post',
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Basic " + "" //ENTER ENCODED STRING
body: "grant_type=client_credentials"
View pagePayPal.rb
import {getAccess, order} from 'backend/payPal.jsw';
import wixLocation from 'wix-location';
$w.onReady(function () {
export function checkout_click(event) {
.then( (tok) => {