Git Product home page Git Product logo

Comments (3)

bjguillot avatar bjguillot commented on September 18, 2024

I'll need to investigate this further to get to the bottom of it for you.

Please submit a support case using the following link:
https://sellercentral.amazon.com/gp/contact-us/contact-amazon-form.html

Be sure to select "Amazon Pay" and then "Amazon Pay Issues" to ensure your question is routed to the correct support queue.

from amazon-pay-sdk-samples.

webprogrammierer avatar webprogrammierer commented on September 18, 2024

Maybe the problem is located here:

   <script type="text/javascript">
        new OffAmazonPayments.Widgets.AddressBook({
            sellerId: "YOUR_MERCHANT_ID",
            onOrderReferenceCreate: function (orderReference) {
                /* make a call to the back-end that will set order reference details
                 * and get order reference details. This will set the order total
                 * to 19.95 and return order reference details.
                 *
                 * Get the AddressConsentToken to be sent to the API call
                 */
               var access_token = "";
                $.post("Apicalls/GetDetails.php", {
                    orderReferenceId: orderReference.getAmazonOrderReferenceId(),
                    addressConsentToken: access_token,
                }).done(function (data) {
                   $("#get_details_response").html(data);
                });
            },
            onAddressSelect: function (orderReference) {
            },
            design: {
                designMode: 'responsive'
            },
            onError: function (error) {
                // your error handling code
            }
        }).bind("addressBookWidgetDiv");
        new OffAmazonPayments.Widgets.Wallet({
            sellerId: "YOUR_MERCHANT_ID",
            onPaymentSelect: function (orderReference) {
            },
            design: {
                designMode: 'responsive'
            },
            onError: function (error) {
                // your error handling code
            }
        }).bind("walletWidgetDiv");
    </script>

I think the wallet widget is called BEFORE the results of $.post("Apicalls/GetDetails.php" are here.

This does not occur on every payment, but randomly again and again.

When I remove the calls for the addressbook widgets and move the call for $.post("Apicalls/GetDetails.php" into the wallet widget object call ( to omitt the addressbook widget for digial goods), then the problem (seller details not privided) disappears.

So the problem must be located in the code above!
I think we need subsequent calls for "getdetails" and "addressbook widget", but here they seem to be not subsequent (asyonchronous javscript result on..events).

If you understand what I mean you can test it, reproduce it and solve it.

from amazon-pay-sdk-samples.

bjguillot avatar bjguillot commented on September 18, 2024

This issue was corrected in the update made to the SetPaymentDetails.php file back in August 2017. The original version of the file did not wrap the AddressBook widget inside a window.onAmazonPaymentsReady callback. That was likely leading to the issues you were observing relating to the load order. The current version should work properly.

from amazon-pay-sdk-samples.

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.