나는 paypal plus와 각도를 통합해야하는 프로젝트에서 일하고 있습니다. 그러나 스크립트 (paypal 스크립트)를 HTML에 넣을 때 각도가 PAYPAL.apps.PPP
스크립트의 변수를 인식하지 못합니다. 콘솔에서이 오류를받습니다.AngularJS가 paypal과 함께 작동하지 않습니다
angular.js:13550 ReferenceError: PAYPAL is not defined
at eval (eval at globalEval (http://localhost:9000/bower_components/jquery/dist/jquery.js:343:5), <anonymous>:1:23)
at Function.globalEval (http://localhost:9000/bower_components/jquery/dist/jquery.js:343:5)
at domManip (http://localhost:9000/bower_components/jquery/dist/jquery.js:5291:15)
at jQuery.append (http://localhost:9000/bower_components/jquery/dist/jquery.js:5431:10)
at jQuery.<anonymous> (http://localhost:9000/bower_components/jquery/dist/jquery.js:5525:18)
at access (http://localhost:9000/bower_components/jquery/dist/jquery.js:3614:8)
at jQuery.html (http://localhost:9000/bower_components/jquery/dist/jquery.js:5492:10)
at link (http://localhost:9000/bower_components/angular/angular.js:25866:18)
at invokeLinkFn (http://localhost:9000/bower_components/angular/angular.js:9694:9)
at nodeLinkFn (http://localhost:9000/bower_components/angular/angular.js:9093:11) <div ng-include="'app/account/payment/panel/paypal.html'" class="ng-scope">"
HTML 코드 : 여기
<script src="https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js" type="text/javascript"></script>
<script type="application/javascript">
var ppp = PAYPAL.apps.PPP({"approvalUrl": '.$approvalUrl.',"placeholder": "ppplus","mode": "sandbox"});
</script>
<div id="ppplus"> </div>
<button type="submit"
id="continueButton"
onclick="ppp.doContinue(); return false;">Continuar
</button>
누군가 각도 또는 수입 다른 스크립트와 페이팔을 통합하는 방법을 알고는 응용 프로그램에서 사용할 수 있습니다. o/
그것은 페이팔 JS처럼로드지고 있지 않거나로드하기 전에 각 스크립트가 실행되는 것 같다. – plong0
'PAYPAL'은'jQuery'와 함께 작동합니다. 헤더에'jQuery' 스크립트를 포함 시켰습니까? –
@ plong0 나는 스크립트를 index.html 페이지에 넣었습니다. 신속한 답변을 주신 고마워요! : P –