javascript - Pay With Amazon Open in Popup Window -
i using pay amazon express integration. in have create custom pay amazon
button described here:
everything working smoothly, when click on pay amazon
button, opens window in same page. want window open in popup
.
is there way, can make pay amazon
button open window
in popup
.
here code:
<script type="text/javascript"> offamazonpayments.button("amazonpaybutton", app.conf.amazonpaysellerid, { type: "hostedpayment", hostedparametersprovider: function(done) { $.getjson(app.conf.siteurl + 'generatepaymentrequestsignature', { amount: $("#depositamount").val() ? $("#depositamount").val() : 10, currencycode: 'usd', sellernote: "deposit app", returnurl : window.location.href, sellerorderid : localstorage.getitem("useraccesstoken") }, function(data) { if(data.status && data.code == 200) { done(json.parse(data.data)); } else { alert("service not available. please try again later"); } }) }, onerror: function(errorcode) { console.log(errorcode.geterrorcode() + " " + errorcode.geterrormessage()); } }); </script>
i wanted open in popup, because app embedded other sites using iframe
. , when click on pay
button, opens in same window not functioning.
note: there option available opening window in popup, buttons generated using button generator utility said here, don't know how can done using hostedpayment
type.
thanks time.
there isn't way since hosted solution. sample referenced doesn't use button generator uses standard login amazon integration. button generated button generator considered express integration.
the way have popup experience custom lpa integration pay button not work in iframe.
Comments
Post a Comment