1.17.0 • Published 1 month ago

@solidgate/vue-sdk v1.17.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 month ago

Solidgate Vue3 SDK

This repository is a Vue 3 wrapper for the Solidgate Client Software Development Kit (SDK).

It supports rendering payment forms and resign forms, including custom container elements for Google Pay, Apple Pay, or PayPal buttons.

Check our

  • Payment guide to understand business value better
  • API Reference to find more examples of usage

Structure

Installation

Run the following command inside your Vue 3 project:

npm i @solidgate/vue-sdk

Usage

Payment form

Render a payment form component in your Vue3 project.

<template>
  <Payment :merchant-data="merchantData" />
</template>

<script lang="ts" setup>
import Payment, { InitConfig } from '@solidgate/vue-sdk'

const merchantData: InitConfig['merchantData'] = {
  merchant: '<<--YOUR MERCHANT ID-->>',
  signature: '<<--YOUR SIGNATURE OF THE REQUEST-->>',
  paymentIntent: '<<--YOUR PAYMENT INTENT-->>'
}
</script>

Custom containers

To render Google Pay, Apple Pay, or PayPal buttons in separate containers, define Payment as an asynchronous component and pass references to the container elements.

<template>
  <Payment
    :merchan-data="merchantData"
    :google-pay-container-ref="googleButton"
    :apple-pay-container-ref="appleButton"
    :paypal-container-ref="paypalButton"
  />
  <div ref="googleButton" />
  <div ref="appleButton" />
  <div ref="paypalButton" />
</template>

<script lang="ts" setup>
import { ref, defineAsyncComponent } from 'vue'
import { InitConfig } from '@solidgate/vue-sdk'
const Payment = defineAsyncComponent(() => import('@solidgate/vue-sdk'))

const googleButton = ref<HTMLDivElement>()
const appleButton = ref<HTMLDivElement>()
const paypalButton = ref<HTMLDivElement>()

const merchantData: InitConfig['merchantData'] = {
  merchant: '<<--YOUR MERCHANT ID-->>',
  signature: '<<--YOUR SIGNATURE OF THE REQUEST-->>',
  paymentIntent: '<<--YOUR PAYMENT INTENT-->>'
}
</script>

Resign form

Render a resign payment form component in your Vue3 project.

<template>
  <Resign :resign-request="resignRequest" />
</template>

<script lang="ts" setup>
import { Resign, ResignRequest } from '@solidgate/vue-sdk'

const resignRequest: ResignRequest = {
  merchant: '<<--YOUR MERCHANT ID-->>',
  signature: '<<--YOUR SIGNATURE OF THE REQUEST-->>',
  resignIntent: '<<--YOUR RESIGN INTENT-->>'
}
</script>

Development server

Vue3 + Typescript + Vite

  1. cd vue-sdk
  2. npm i
  3. npm run start
  4. Navigate to http://localhost:3000/

Build

  1. cd vue-sdk
  2. npm run build
  3. cd dist
  4. solid-payment.es.js is a js bundle
1.15.0

5 months ago

1.14.0

6 months ago

1.17.0

1 month ago

1.15.2

4 months ago

1.16.0

2 months ago

1.15.1

4 months ago

1.13.0

9 months ago

1.12.0

9 months ago

1.11.0

11 months ago

1.10.1

1 year ago

1.9.1

1 year ago

1.9.0

1 year ago

1.10.0

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.2.0

3 years ago

1.1.3

3 years ago

1.3.0

3 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago