Giter VIP home page Giter VIP logo

Comments (9)

shrakuma avatar shrakuma commented on September 28, 2024

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.

ozwaldorf avatar ozwaldorf commented on September 28, 2024

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.

ozwaldorf avatar ozwaldorf commented on September 28, 2024

@shrakuma Have you made any progress on this?

from amazon-pay-sdk-php.

shrakuma avatar shrakuma commented on September 28, 2024

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.

ozwaldorf avatar ozwaldorf commented on September 28, 2024

@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.

shrakuma avatar shrakuma commented on September 28, 2024

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.

islandskater43 avatar islandskater43 commented on September 28, 2024

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.

ozwaldorf avatar ozwaldorf commented on September 28, 2024

@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.

shrakuma avatar shrakuma commented on September 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.