Hi, I've just create a simil html for Paypal.
It's the modified original HTML of the "Smart Button".
If you want other button, ask.
Here's the tutorial
Download the HTML file
Go to "https://www-paypal-com.ezproxy.canberra.edu.au/us/home" -------> Sign In/ Sign Up
Sign in or create an account
Once in the dashboard go to developer
Go to "Get API Credentials"
Choose Sandbox (testing) or Live ---> Create App
Choose the name ---> Create App
Copy the Client ID
Open the HTML by notepad++ or visual studio code
Put the copied Client ID over n1
and the value n2 is the currency (USD dollar, EUR euro; here's the complete list )
Save and open app inventor
Create a new project, add a WebViewer, a notifier and go to the blocks.
Put the code in the photo or copy from the example
Dear R_A! We have downloaded Peluchazon.aia and it works fine. However we are left with one big question: Since we need to pass in the Paypal.html our Paypal Client code, we also need to know where this file is stored. In the App Inventor blocks the file is accessed via https on the Localhost. In other words where shall we store "our" Paypal.html?
Big thank you!
Regards
Vittorio
Dear @Vittorio11,
Thanks for the interest. Like in the example file is stored like an asset and called by the url "http://localhost/"+file name (Paypal.html); that's where, when is deployed, it sees the html. So you have to put it as an asset (or you can do it on a site apart and show it passing datas by url).
Looking forward to hearing from you soon,
R_A
Should that line just be a comment then? The url indicates that the js file is in the assets of the aia project? Should it show a link to the actual file on the internet? I do not understand why it is there.
Hello! WE have implemented as shown over the call from AI to PayPal using subscription plan in PayPal. After using a test plan for a while, we have created a real plan in PayPal. We get the entire code from paypal to use in the .html file that we call from app inventor. We see that the .html file works perfectly when called from a browser. BUT, from app inventor the very same .htm file calls the "test" plan instead of the correct plan. Yet the P-ID is correct and all. Any suggestion?
Hi @Vittorio11,
when I made it was only for test and for fun, so I didn't use the real mode, so I can only suggest to experiment with it. If you find the solution you can post to help other creators.
Good luck for your project,
RO