{"id":16735669,"url":"https://github.com/jeff-labs/vue-braintree-paypal-button","last_synced_at":"2025-08-15T22:33:05.331Z","repository":{"id":37732618,"uuid":"142775121","full_name":"jeff-labs/vue-braintree-paypal-button","owner":"jeff-labs","description":"Vue Braintree PayPal button","archived":false,"fork":false,"pushed_at":"2022-12-10T17:51:20.000Z","size":5312,"stargazers_count":4,"open_issues_count":14,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-29T13:03:35.845Z","etag":null,"topics":["frontend","javascript","npm","npm-package","vue","vue-component"],"latest_commit_sha":null,"homepage":"https://jeff-labs.github.io/vue-braintree-paypal-button","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeff-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-29T16:03:20.000Z","updated_at":"2021-05-07T07:14:36.000Z","dependencies_parsed_at":"2023-01-26T07:01:14.382Z","dependency_job_id":null,"html_url":"https://github.com/jeff-labs/vue-braintree-paypal-button","commit_stats":null,"previous_names":["mrjeffapp/vue-braintree-paypal-button"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jeff-labs/vue-braintree-paypal-button","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-labs%2Fvue-braintree-paypal-button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-labs%2Fvue-braintree-paypal-button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-labs%2Fvue-braintree-paypal-button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-labs%2Fvue-braintree-paypal-button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeff-labs","download_url":"https://codeload.github.com/jeff-labs/vue-braintree-paypal-button/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-labs%2Fvue-braintree-paypal-button/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265926945,"owners_count":23850886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frontend","javascript","npm","npm-package","vue","vue-component"],"created_at":"2024-10-13T00:06:52.297Z","updated_at":"2025-07-19T11:34:05.861Z","avatar_url":"https://github.com/jeff-labs.png","language":"JavaScript","funding_links":["https://developer.paypal.com/docs/checkout/how-to/customize-button/"],"categories":[],"sub_categories":[],"readme":"# Vue Braintree PayPal button\n![npm (scoped)](https://img.shields.io/npm/v/@mrjeffapp/vue-braintree-paypal-button.svg)\n\nVue component to integrate PayPal payments through Braintree using Vault flow.\n\n## Demo\n[Demo app](https://jeff-labs.github.io/vue-braintree-paypal-button/)\n\n## Documentation\n\n[Braintree PayPal vault flow](https://developers.braintreepayments.com/guides/paypal/vault/javascript/v3)\n\n[Paypal button customization](https://developer.paypal.com/docs/checkout/how-to/customize-button/)\n\n## Installation\n### Yarn\n```bash\nyarn add @mrjeffapp/vue-braintree-paypal-button\n```\n### NPM\n```bash\nnpm install --save @mrjeffapp/vue-braintree-paypal-button\n```\n\n## Usage\n### Example: TokenGenerator.vue\n```javascript\n\u003ctemplate\u003e\n    \u003cBraintreePaypalButton v-bind:styles=\"{ shape: 'rect' }\" :token=\"token\" :env=\"environment\" :locale=\"locale\" v-on:error=\"onError\" v-on:authorized=\"onAuthorize\" v-on:canceled=\"onCancel\" /\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n\nimport BraintreePaypalButton from '@/components/BraintreePaypalButton.vue';\n\nexport default {\n  name: 'TokenGenerator',\n  components: {\n    BraintreePaypalButton,\n  },\n  data() {\n    return {\n      environment: 'sandbox',\n      token: 'token',\n      locale: 'es_ES',\n    };\n  },\n  methods: {\n    onAuthorize: (nonce) =\u003e {\n      console.log(nonce);\n    },\n    onCancel: () =\u003e {\n      console.log('Cancelled');\n    },\n    onError: (error) =\u003e {\n      console.error(error);\n    },\n  },\n};\n\u003c/script\u003e\n\n\u003cstyle\u003e\n\u003c/style\u003e\n\n```\n\n### Component props\n\n#### env\n- Type: `String`\n- Required: `true`\n- Values: `production` | `sandbox`\n\n#### token\n- Type: `String`\n- Required: `false`\n- Value: [Client token from your integration to Braintree](https://developers.braintreepayments.com/reference/request/client-token/generate/node)\n\n#### locale\n- Type: `String`\n- Required: `false`\n- Default: `en_US`\n- Values: [Supported locales](https://developer.paypal.com/docs/checkout/how-to/customize-button/#supported-locales)\n\n#### styles\n- Type: `Object`\n- Required: `false`\n- Default: `{}`\n- Values: [Customize button](https://developer.paypal.com/docs/checkout/how-to/customize-button/)\n\n### Component events\n\n#### authorize\nWhen customer authorize vault flow.\n\n#### cancel\nWhen customer cancel vault flow.\n\n#### error\nWhen an error occurs.\n\n## Developing\n### Project setup\n```bash\nyarn install\n```\n\n### Compiles and hot-reloads for development\n```bash\nyarn serve\n```\n\n### Compiles and minifies for production\n```bash\nyarn build\n```\n\n### Lints and fixes files\n```bash\nyarn lint\n```\n\n### Run unit tests\n```bash\nyarn test:unit\n```\n\n### Run en to end tests\n```bash\nyarn test:e2e\n```\n\n### Deploy documentation to GitHub pages\n```\nyarn gh-pages\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeff-labs%2Fvue-braintree-paypal-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeff-labs%2Fvue-braintree-paypal-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeff-labs%2Fvue-braintree-paypal-button/lists"}