vue中集成的ui组件库_Vue组件可使用Vault Flow通过Braintree集成PayPal付款

vue中集成的ui组件库

Vue Braintree PayPal按钮 (Vue Braintree PayPal button)

Vue component to integrate PayPal payments through Braintree using Vault flow.

Vue组件可使用Vault Flow通过Braintree集成PayPal付款。

安装 (Installation)

(Yarn)

yarn add @mrjeffapp/vue-braintree-paypal-button

NPM (NPM)

npm install --save @mrjeffapp/vue-braintree-paypal-button

用法 (Usage)

示例:TokenGenerator.vue (Example: TokenGenerator.vue)

<template>
    <BraintreePaypalButton v-bind:styles="{ shape: 'rect' }" :token="token" :env="environment" :locale="locale" v-on:error="onError" v-on:authorized="onAuthorize" v-on:canceled="onCancel" />
</template>

<script>

import BraintreePaypalButton from '@/components/BraintreePaypalButton.vue';

export default {
  name: 'TokenGenerator',
  components: {
    BraintreePaypalButton,
  },
  data() {
    return {
      environment: 'sandbox',
      token: 'token',
      locale: 'es_ES',
    };
  },
  methods: {
    onAuthorize: (nonce) => {
      console.log(nonce);
    },
    onCancel: () => {
      console.log('Cancelled');
    },
    onError: (error) => {
      console.error(error);
    },
  },
};
</script>

<style>
</style>

组件道具 (Component props)

环保 (env)
  • Type: String

    类型: String

  • Required: true

    必填: true

  • Values: production | sandbox

    价值: production sandbox

代币 (token)
地区 (locale)
样式 (styles)

组件事件 (Component events)

授权 (authorize)

When customer authorize vault flow.

客户授权金库流程时。

取消 (cancel)

When customer cancel vault flow.

当客户取消保险库流程时。

错误 (error)

When an error occurs.

发生错误时。

发展 (Developing)

项目设置 (Project setup)

yarn install

编译和热重装以进行开发 (Compiles and hot-reloads for development)

yarn serve

编译并最小化生产 (Compiles and minifies for production)

yarn build

整理和修复文件 (Lints and fixes files)

yarn lint

运行单元测试 (Run unit tests)

yarn test:unit

运行en结束测试 (Run en to end tests)

yarn test:e2e

翻译自: https://vuejsexamples.com/vue-component-to-integrate-paypal-payments-through-braintree-using-vault-flow/

vue中集成的ui组件库

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值