Paypal Log In Button integration in AngularJS
<p>I generated the code snippet for the LoginPaypal button from <a href="https://developer.paypal.com/docs/integration/direct/identity/button-js-builder/" rel="nofollow">here</a> and it produced something like this:</p>

<pre><code>&lt;span id="paypalButton"&gt;&lt;/span&gt;
&lt;script src="https://www.paypalobjects.com/js/external/api.js"&gt;&lt;/script&gt;
&lt;script&gt;
    paypal.use( ["login"], function(login) {
      login.render ({
        "appid": &lt;appid&gt;,
        "authend": "sandbox",
        "scopes": "profile email address phone https://uri.paypal.com/services/paypalattributes",
        "containerid": "paypalButton",
        "locale": "en-us",
        "returnurl": "http://my.domain.here/return.php"
      });
    });
&lt;/script&gt;
</code></pre>

<p>My app is an AngularJS app, and integrating this snippet it throws this error in the browsers console:</p>

<pre><code>ReferenceError: paypal is not defined
at eval (eval at &lt;anonymous&gt; (http://localhost:8080/meritwork/assets/javascript/library/jquery.js:330:5), &lt;anonymous&gt;:1:1)
at eval (native)
at Function.jQuery.extend.globalEval (http://localhost:8080/meritwork/assets/javascript/library/jquery.js:330:5)
at jQuery.fn.extend.domManip (http://localhost:8080/meritwork/assets/javascript/library/jquery.js:5411:16)
at jQuery.fn.extend.append (http://localhost:8080/meritwork/assets/javascript/library/jquery.js:5194:15)
at null.&lt;anonymous&gt; (http://localhost:8080/meritwork/assets/javascript/library/jquery.js:5309:18)
at jQuery.access (http://localhost:8080/meritwork/assets/javascript/library/jquery.js:3465:8)
at jQuery.fn.extend.html (http://localhost:8080/meritwork/assets/javascript/library/jquery.js:5276:10)
at removePatch [as html] (http://localhost:8080/meritwork/assets/javascript/library/angular.js:2292:25)
at link (http://localhost:8080/meritwork/assets/javascript/library/angular-route.min.js:7:180) &lt;div ng-view="" style="padding-top: 70px" class="ng-scope"&gt;
</code></pre>

<p>I am new to this field and I don't quite understand the error. I tried looking it up and didn't find anything. Does anyone have any suggestions of what it might be wrong ?</p>

<p>Thank you.</p>