Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all unnecessary JavaScript and use PHP instead of it #10

Closed
webprogrammierer opened this issue Mar 17, 2017 · 3 comments
Closed

Comments

@webprogrammierer
Copy link

webprogrammierer commented Mar 17, 2017

Your example code uses a lot of JavaScript / JQuery code and shows result data in JSON format, but this is not practical.

Is it possible to remove all unnecessary JavaScript and JQuery code and use PHP instead?
How?

@bjguillot
Copy link
Contributor

Thanks for the suggestion. I'll discuss with the Amazon Pay SDK team.

Can you expand on why the jQuery and JSON format isn't practical for your implementation?

@webprogrammierer
Copy link
Author

JSON and a lot of JQuery code (except the calls for Amazon Pay widgets) are not needed for the PHP implementation of Amazon Pay solution.

If we are using PHP we can use PHP also for the error handling and much more.

We don't need to show the JSON results in browser. No customer will want to see it, this is just a show.

What we need is error handling code in PHP and sending emails to the shop webmaster if errors occur and saving result/errors of every payment to database or text files.

All this can be done better with php!

@bjguillot
Copy link
Contributor

I updated the PHP samples recently to clean them up. I removed references to JavaScript libraries that were not being used in the examples.

I left the code in that shows the JSON results on-screen, as these are intended to be tutorials on how the Amazon Pay API and SDKs work.

Based on your comments, it sounds like what you are looking for is more akin to a "reference implementation" of the PHP SDK that is buyer-facing rather than developer-facing. That is a good idea and we are thinking about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants