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 obj = []; | |
| export function dataset1_ready() { | |
| let itemLength = $w("#dataset1").getTotalCount(); | |
| $w("#dataset1").getItems(0, itemLength) | |
| .then( (result) => { | |
| let items = result.items; | |
| aCoolFunction(items, itemLength); | |
| }); | |
| } |
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
| //Google Calendar Event | |
| https://calendar.google.com/calendar/r/eventedit?text=The+Event+Name&dates=20191005T100000/20191005T220000&details=The+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 | |
| https://outlook.live.com/owa/?path=/calendar/action/compose&rru=addevent&startdt=20191005T043000&enddt=20191005T163000&subject=The+Event+Name&body=The+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 |
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
| //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); |
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
| 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" | |
| } | |
| }; |
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
| 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) => { | |
| console.log(res); | |
| if(res.status === 'Active') { | |
| wixUsers.applySessionToken(res.sessionToken) |
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
| 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; | |
| } |
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
| 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 = wixUsers.currentUser.id; | |
| wixData.query('cart') | |
| .eq('userId', user) | |
| .find() |
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
| import wixPay from 'wix-pay-backend'; | |
| export function createMyPayment(products, amt, cry) { | |
| return wixPay.createPayment({ | |
| items: products, | |
| amount: amt, | |
| currency: cry | |
| }); | |
| } |
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
| import {fetch} from 'wix-fetch'; | |
| export async function getAccess() { | |
| const response = await fetch("https://api.sandbox.paypal.com/v1/oauth2/token", { | |
| method: 'post', | |
| headers: { | |
| "Content-Type": "application/x-www-form-urlencoded", | |
| "Authorization": "Basic " + "" //ENTER ENCODED STRING | |
| }, | |
| body: "grant_type=client_credentials" |
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
| import {getAccess, order} from 'backend/payPal.jsw'; | |
| import wixLocation from 'wix-location'; | |
| $w.onReady(function () { | |
| }); | |
| export function checkout_click(event) { | |
| getAccess() | |
| .then( (tok) => { |
OlderNewer