ReferenceError: paypal is not defined when i setup PayPal Checkout using vuejs

I have a component PaypalButton.vue and when i implement my button following these instructions:

    <div id="paypal-button-container"></div>
    <script src="" >
      // Required. Replace SB_CLIENT_ID with your sandbox client ID.

import JQuery from 'jquery'
let $ = JQuery

var checkExist = setInterval(function() {
   if ($('#paypal-button-container').length) {
    createOrder: function(data, actions) {
      // This function sets up the details of the transaction, including the amount and line item details.
      return actions.order.create({
        purchase_units: [
            amount: {
              value: "0.01"
    onApprove: function(data, actions) {
      // This function captures the funds from the transaction.
      return actions.order.capture().then(function(details) {
        // This function shows a transaction success message to your buyer.
        alert("Transaction completed by " +;
//This function displays Smart Payment Buttons on your web page.

}, 100); // check every 100ms

export default {
  data: () => ({

I get this error..does someone know what is happening? I tried to import the paypal script in index.html but the same thing happens

enter image description here



Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.