Skip to content

Instantly share code, notes, and snippets.

View vaibhavgehani's full-sized avatar

Vaibhav Gehani vaibhavgehani

View GitHub Profile
{
"timeZone": "America/Los_Angeles",
"dependencies": {
"libraries": [{
"userSymbol": "FirebaseApp",
"libraryId": "1hguuh4Zx72XVC1Zldm_vTtcUUKUA6iBUOoGnJUWLfqDWx5WlOJHqYkrt",
"version": "29",
"developmentMode": true
}]
},
<template>
<ion-page>
<ion-header>
<ion-toolbar color="primary">
<ion-buttons slot="start">
<ion-menu-button></ion-menu-button>
</ion-buttons>
<ion-title>
Pay pal
</ion-title>
import { defineComponent } from 'vue';
import { IonPage, IonHeader, IonToolbar, IonButtons, IonMenuButton, IonTitle, IonContent, IonGrid, IonRow, IonCol, IonCard, IonImg, IonCardContent, IonButton } from '@ionic/vue';
import Axios from 'axios';
import { alertController } from '@ionic/vue';
declare const braintree: any;
export default defineComponent({
data() {
return {
const express = require("express");
const app = express();
const bodyParser = require('body-parser');
const cors = require("cors")
const braintree = require("braintree");
const gateway = new braintree.BraintreeGateway({
environment: braintree.Environment.Sandbox,
merchantId: "USE_YOUR_MERCHENT_ID",
publicKey: "USE_YOUR_PUBLIC_KEY",
mounted() {
this.addScript();
},
methods: {
addScript() {
const script = document.createElement("script");
script.src ="https://js.braintreegateway.com/js/braintree-2.32.1.min.js";
script.addEventListener("load", this.initializeBraintree);
document.body.appendChild(script);
},
import { defineComponent } from 'vue';
import { IonPage, IonHeader, IonToolbar, IonButtons, IonMenuButton, IonTitle, IonSegment, IonSegmentButton, IonContent, IonItem, IonSelect, IonSelectOption, IonGrid, IonRow, IonCol, IonCard, IonCardHeader, IonCardContent, IonListHeader, IonLabel, IonImg } from '@ionic/vue';
export default defineComponent({
data() {
return {
language: 'en'
}
},
<template>
<ion-app>
<ion-router-outlet />
</ion-app>
</template>
<script lang="ts">
import { IonApp, IonRouterOutlet } from '@ionic/vue';
import { defineComponent } from 'vue';
import { Device, DevicePlugin } from '@capacitor/device';
import { createApp } from 'vue'
import App from './App.vue'
import router from './router';
import { IonicVue } from '@ionic/vue';
/* Core CSS required for Ionic components to work properly */
import '@ionic/vue/css/core.css';
/* Basic CSS for apps built with Ionic */
export const globalizationList = {
en: {
title: 'Hello sir',
TITLE_2: 'Hello {value}',
description: 'Ooohh .... did you just translate this text ?',
data: {
name: 'My name is {name_value}'
}
},
es: {
<template>
<ion-page>
<ion-header>
<ion-toolbar color="danger">
<ion-title>
Tab One
</ion-title>
</ion-toolbar>
</ion-header>