Originally posted by lesliekirk
View Post
Announcement
Collapse
No announcement yet.
Amazon Pay Additional Button Support?
Collapse
X
-
Originally posted by jsdva View Post
Yep, that opens the login popup and allows you to go through Amazon Checkout on the site.
Leave a comment:
-
Originally posted by lesliekirk View PostFYI - I have tried this
Code:<div id="payWithAmazonDiv"> <img src="https://d2ldlvi1yef00y.cloudfront.net/us/live/en_us/amazonpay/gold/large/button_T6.png?sellerId=&mvta:amazonpay:merchantid;" style="cursor: pointer;"/> </div>
Leave a comment:
-
FYI - I have tried this
Code:<div id="payWithAmazonDiv"> <img src="https://d2ldlvi1yef00y.cloudfront.net/us/live/en_us/amazonpay/gold/large/button_T6.png?sellerId=&mvta:amazonpay:merchantid;" style="cursor: pointer;"/> </div>
Leave a comment:
-
Originally posted by dreamingdigital View PostThanks Brennan.
Yes.
Here is what "Advanced Mode" looks like with the default <img> tag:
HTML Code:<script> var amazonOrderReferenceId; new OffAmazonPayments.Widgets.Button( { sellerId: '&mvt:amazonpay:merchantid_encoded;', onSignIn: function( orderReference ) { amazonOrderReferenceId = orderReference.getAmazonOrderReferenceId(); AmazonPay_SaveAmazonOrderReferenceId( amazonOrderReferenceId, function( response ) { if ( !response.success ) { return alert( response.error_message ); } window.location = '&mvt:amazonpay:apa_ocst_url_encoded;'; } ); }, onError: function( error ) { return alert( error.getErrorMessage() ); } } ).bind( "payWithAmazonDiv" ); function AmazonPay_SaveAmazonOrderReferenceId( amazonOrderReferenceId, callback ) { return AJAX_Call_Module( callback, 'runtime', 'amazonpay', 'AmazonPay_SaveAmazonOrderReferenceId', 'AmazonOrderReferenceId=' + encodeURIComponent( amazonOrderReferenceId ) ); } </script> <div id="payWithAmazonDiv"> <img src="&mvt:amazonpay:amazon_button_url;?sellerId=&mvta:amazonpay:merchantid;&size=&mvta:amazonpay_button:size;&color=&mvta:amazonpay_button:color;" style="cursor: pointer;"/> </div>
HTML Code:<img src="/images/Button_gold_L._V526162778_.png?&mvta:amazonpay:amazon_button_url;&sellerId=&mvta:amazonpay:merchantid;&size=&mvta:amazonpay_button:size;&color=&mvta:amazonpay_button:color;" />
FYI:
The code for my hack/workaround was this: I added an ID to the default image tag and then overwrote the SRC attribute onload.
HTML Code:{all script default as above} <div id="payWithAmazonDiv"> <img id="myAZBtn" src="&mvt:amazonpay:amazon_button_url;?sellerId=&mvta:amazonpay:merchantid;&size=&mvta:amazonpay_button:size;&color=&mvta:amazonpay_button:color;" style="cursor: pointer;"/> </div> <script type="text/javascript"> $(function() { //console.log( "ready colin!" ); $('#myAZBtn').attr('src','/images/Button_gold_L._V526162778_.png'); }); </script>
Code:&size=&mvta:amazonpay_button:size;&color=&mvta:amazonpay_button:color;
Leave a comment:
-
I'd also like a better display of the address/etc widgets. No pixels please.
Leave a comment:
-
Originally posted by dreamingdigital View PostIs there a workaround to use more AmazonPay buttons yet? FYI My hacks don't work.
button.jpg
Leave a comment:
-
Is there a workaround to use more AmazonPay buttons yet? FYI My hacks don't work.
Leave a comment:
-
Thanks Brennan.
Yes.
Here is what "Advanced Mode" looks like with the default <img> tag:
HTML Code:<script> var amazonOrderReferenceId; new OffAmazonPayments.Widgets.Button( { sellerId: '&mvt:amazonpay:merchantid_encoded;', onSignIn: function( orderReference ) { amazonOrderReferenceId = orderReference.getAmazonOrderReferenceId(); AmazonPay_SaveAmazonOrderReferenceId( amazonOrderReferenceId, function( response ) { if ( !response.success ) { return alert( response.error_message ); } window.location = '&mvt:amazonpay:apa_ocst_url_encoded;'; } ); }, onError: function( error ) { return alert( error.getErrorMessage() ); } } ).bind( "payWithAmazonDiv" ); function AmazonPay_SaveAmazonOrderReferenceId( amazonOrderReferenceId, callback ) { return AJAX_Call_Module( callback, 'runtime', 'amazonpay', 'AmazonPay_SaveAmazonOrderReferenceId', 'AmazonOrderReferenceId=' + encodeURIComponent( amazonOrderReferenceId ) ); } </script> <div id="payWithAmazonDiv"> <img src="&mvt:amazonpay:amazon_button_url;?sellerId=&mvta:amazonpay:merchantid;&size=&mvta:amazonpay_button:size;&color=&mvta:amazonpay_button:color;" style="cursor: pointer;"/> </div>
HTML Code:<img src="/images/Button_gold_L._V526162778_.png?&mvta:amazonpay:amazon_button_url;&sellerId=&mvta:amazonpay:merchantid;&size=&mvta:amazonpay_button:size;&color=&mvta:amazonpay_button:color;" />
FYI:
The code for my hack/workaround was this: I added an ID to the default image tag and then overwrote the SRC attribute onload.
HTML Code:{all script default as above} <div id="payWithAmazonDiv"> <img id="myAZBtn" src="&mvt:amazonpay:amazon_button_url;?sellerId=&mvta:amazonpay:merchantid;&size=&mvta:amazonpay_button:size;&color=&mvta:amazonpay_button:color;" style="cursor: pointer;"/> </div> <script type="text/javascript"> $(function() { //console.log( "ready colin!" ); $('#myAZBtn').attr('src','/images/Button_gold_L._V526162778_.png'); }); </script>
Leave a comment:
-
Can you post an example of the changes you're making in advanced mode that is causing a second button to show up? You should be able to modify the source of the button to point to a new image.
Leave a comment:
-
Amazon Pay Additional Button Support?
The Amazon Pay button support built into the Miva Module has orange and tan in three similar sizes. Amazon has a TON of other buttons that are accepted. See here: https://pay.amazon.com/us/merchant/tools and we can't get these through the 'point and click' mode on the amazon pay button config on the BASK page. I have tried the 'advanced' mode - you have access to the <img> tag. The problem is if you manipulate that <img> tag in advanced mode and supply your own saved copy of another Amazon image, the module will output a duplicate Amazon Pay button using the default settings. I have also tried putting just an ID on the <img> tag and using javascript to swap the SRC attribute once the page is loaded to a button of my choice. This works some of the time in some browsers but ultimately is not consistent and is a hack, obviously.
What is the way to actually use something from here instead? https://pay.amazon.com/us/merchant/tools
Sorry I can not post links.
ColinTags: None
Leave a comment: