Comments (9)
Hi
Thank you for your feedback. Could you please elaborate on the issues you faced with the instructions and the methods,Which parts of the sample demo was not clear.
With all the information that will be provided by you we can definitely take this up immediately to make and incorporate the changes so as to provide the best experience to our developer community
from amazon-pay-sdk-php.
I had issues on initiating the PHP. The only way I figured out how to was by finding a comment in the sample code that said 'ajax'. You should provide a sample jQuery ajax request developers can use. You should do the same for the rest of the PHP code. The site https://payments.amazon.com/documentation/lpwa/201749840 uses PHP to get the customer information, whereas the demo uses an asynchronous authRequest to check if the user is logged in and get the customer information. The payments.amazon.com guide says "A client must use an access token to retrieve customer profile data", but using the JavaScript method works perfectly fine, and is much less complicated. You should also put how your directories and files should be set up, and which ones are required for what.
from amazon-pay-sdk-php.
@shrakuma Have you made any progress on this?
from amazon-pay-sdk-php.
Thanks for the above feedback. We have included this as part of our sprint planning,I will be uploading a sample(s) by the end of next week which will showcase an end to end simple checkout example.
Also when you are referring to "The site https://payments.amazon.com/documentation/lpwa/201749840 uses PHP to get the customer information, whereas the demo uses an asynchronous authRequest to check if the user is logged in and get the customer information"
Are you referring to the method as described in the readme https://github.com/amzn/login-and-pay-with-amazon-sdk-php#obtain-profile-information-getuserinfo-method
this method makes it easy as you would just need to send the access token from the URL to this method to get the output.
from amazon-pay-sdk-php.
@shrakuma
https://payments.amazon.com/documentation/lpwa/201749840#201749970
Uses the getUserInfo method also
But the site:
https://amzn.github.io/login-and-pay-with-amazon-sdk-samples/login_and_pay/lpa-login-cart.html
Uses javascript to get the user info.
from amazon-pay-sdk-php.
I agree that the JavaScript method is very useful. In the case of the SDK we wanted to have an inbuilt and an easy function that would do the same in the language of the SDK and provide the appropriate output.
from amazon-pay-sdk-php.
It's also important to understand that the JavaScript methods are very helpful, but shouldn't be used in certain scenarios such as during a login flow. You wouldn't want to use the JS method to retrieve the Amazon CustomerId, and then pass that back to the backend, where an end user could alter the value in transit. You could however use it to pre-populate a field in a checkout flow for Buyer Name.
Do you think clarifying the use case of the two different methods, and adding information on the JS functionality to the documentation (https://payments.amazon.com/documentation/lpwa/201749840#201749970) would help clear up the confusion?
from amazon-pay-sdk-php.
@islandskater43 @shrakuma
I believe that would clear up confusion. I am only using it for frontend calculations, such as getting the zip code for the shipping cost. Anything else is handled by the backend php.
from amazon-pay-sdk-php.
sample has been added to the https://github.com/amzn/login-and-pay-with-amazon-sdk-samples
from amazon-pay-sdk-php.
Related Issues (20)
- php fatal error for newer psr\log
- Error setting certificate verify locations: CAfile: ~/cacert.pem CApath: /etc/ssl/certs. HOT 2
- Unable to post request, underlying exception of SSL certificate problem HOT 2
- Charge convenience method doesn't authorize - FIXED: needs to set a confirmOrder arg HOT 1
- Can't settle in a production environment HOT 4
- client object response false.
- SCA doesn't work in version 2.x
- Why HttpClient implementation is limited to use Curl? HOT 2
- synchronous mode returns Pending HOT 2
- Multi Currency Error
- Send amount on login screen
- InheritShippingAddress does not seem to default to true
- What is the best way to manage recurring payments HOT 3
- switch to php-fig/log vendor instead of inside implementation
- Where is the access token for unit testing? HOT 1
- https://pay.amazon.com/developer/documentation/apireference/201751960 HOT 1
- order of using class methods to perform a transaction HOT 3
- Pay HOT 2
- Jailbreak HOT 1
- str_contains issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-pay-sdk-php.