I've used Paypal Javascript-Sdk in Dynamics CRM Marketing Module Event Website Which is By Default on Angular So It is Working Fine on LocalHost
But When I Tried to Deploy This on Powerappsportals then Somehow it is not Loading & Giving The Following Error on Developer's Console
main.js:2 ERROR ReferenceError: paypal is not defined
at e.payment (main.js:2)
at e.ngAfterViewInit (main.js:2)
at fo (main.js:2)
at ho (main.js:2)
at po (main.js:2)
at ai (main.js:2)
at vi (main.js:2)
at mi (main.js:2)
at ai (main.js:2)
at vi (main.js:2)
So I Realized That Somehow That Paypal SDK is Failed to Load on Production
If Someone Has Already Resolved That Issue Please Help Me On This
Thanks in Advance
So Finally I Found a Solution By Myself.
In Dynamics Portal Management Web Template Section There is a Index.html File Defined. Somehow They Restricted Us to Use The Same Format. So, When I Tried To Deploy My Angular Application. Dynamics Was Expecting The Index File With The Same Format. So It Neglected The Additional Scripts in Header Section.
So, I Just Added The Paypal Script in That File in Header Section & Now Problem Is Resolved. It is Now Showing Button on Production As Well.