0.0.11 • Published 8 months ago

thepeer-vue v0.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

thepeer-vue

Installation

This package only supports Vue 3.

npm

npm install thepeer-vue

yarn

yarn add thepeer-vue

Usage

Only use in <script setup> or setup().

Applies to Vue and Nuxt.

<script setup lang="ts">
import { useCheckout } from 'thepeer-vue'

const checkoutWithThepeer = () => {
  console.log('initializing sdk')

  useCheckout({
    currency: 'NGN',
    amount: 10000,
    meta: {
      discount: 'black friday'
    },
    onSuccess: (response: any) => {
      console.log('🚀 onSuccess', response)
    },
    onError: (response: any) => {
      console.log('🚀 onError', response)
    },
    onClose: (response: any) => {
      console.log('🚀 onClose', response)
    },
    publicKey: 'YOUR_PUBLIC_KEY',
    email: 'CUSTOMER_EMAIL'
  })
}
</script>

<template>
   <button @click="checkoutWithThepeer">Pay with Thepeer</button>
</template>

Implementation is similar for useSend and useDirectCharge.

Configuration Options

License

MIT © Idorenyin Udoh

0.0.11

8 months ago

0.0.10

8 months ago

0.0.9

8 months ago

0.0.8

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago