The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 11-11-2013, 03:16 PM
28440's Avatar
28440 is offline
Junior Member
 
Join Date: Oct 2013
Posts: 5
Default

Amazon Checkout


So the Amazon service has given me this code for their Checkout button:
Code:
<script type='text/javascript' src='https://static-eu.payments-amazon.com/cba/js/gb/sandbox/PaymentWidgets.js'>
</script>

<!-- For Switching to Production, comment out the lines above and uncomment the lines below -->
<!-- <script type='text/javascript' src='https://static-eu.payments-amazon.com/cba/js/gb/PaymentWidgets.js'>
</script> -->

<div id="cbaButton1">
    <img src="https://payments-sandbox.amazon.co.uk/gp/cba/button?type=cart&cartOwnerId=A26EWWDRC3144Y&color=orange&size=large&background=white"/>
    <!-- For Switching to Production, comment out the line above and uncomment the line below -->
    <!--<img src="https://payments.amazon.co.uk/gp/cba/button?type=cart&cartOwnerId=A26EWWDRC3144Y&color=orange&size=large&background=white"/>-->
</div>
<script type='text/javascript'>
  new CBA.Widgets.StandardCheckoutWidget({
    merchantId:'A26EWWDRC3144Y',
    orderInput: { 
        format: "XML",
        value: "type:merchant-signed-order/aws-accesskey/1;order:PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48T3JkZXIgeG1sbnM9Imh0dHA6Ly9wYXltZW50cy5hbWF6b24uY29tL2NoZWNrb3V0LzIwMDktMDUtMTUvIj48Q2FydD48SXRlbXM+PEl0ZW0+PFNLVT5SZWRGaXNoMTIzPC9TS1U+PE1lcmNoYW50SWQ+QTI2RVdXRFJDMzE0NFk8L01lcmNoYW50SWQ+PFRpdGxlPlJlZCBGaXNoPC9UaXRsZT48RGVzY3JpcHRpb24+QSByZWQgZmlzaCBwYWNrZWQgaW4gc3ByaW5nIHdhdGVyIChDQkEgU3RhbmRhcmQgQ29kZSBHZW5lcmF0b3Igc2FtcGxlIGNhcnQpLjwvRGVzY3JpcHRpb24+PFByaWNlPjxBbW91bnQ+MTkuOTk8L0Ftb3VudD48Q3VycmVuY3lDb2RlPkdCUDwvQ3VycmVuY3lDb2RlPjwvUHJpY2U+PFF1YW50aXR5PjE8L1F1YW50aXR5PjwvSXRlbT48L0l0ZW1zPjwvQ2FydD48L09yZGVyPg==;signature:2GzC+4PwRfqWnoaNd+tCTt8BS6I=;aws-access-key-id:AKIAI2JERC2EEOIC2OYA"},
        buttonSettings: { size: 'large',color:'orange',background:'white'}
  }).render("cbaButton1");
</script>
Where do I insert it so it's shown near the Ecwid checkout button?
  #2  
Old 11-13-2013, 12:53 PM
Matt Ecwid's Avatar
Matt Ecwid Matt Ecwid is offline
Ecwid Team
 
Join Date: Oct 2011
Posts: 4,947
Default

Quote:
Originally Posted by 28440 View Post
So the Amazon service has given me this code for their Checkout button:
Code:
<script type='text/javascript' src='https://static-eu.payments-amazon.com/cba/js/gb/sandbox/PaymentWidgets.js'>
</script>

<!-- For Switching to Production, comment out the lines above and uncomment the lines below -->
<!-- <script type='text/javascript' src='https://static-eu.payments-amazon.com/cba/js/gb/PaymentWidgets.js'>
</script> -->

<div id="cbaButton1">
    <img src="https://payments-sandbox.amazon.co.uk/gp/cba/button?type=cart&cartOwnerId=A26EWWDRC3144Y&color=orange&size=large&background=white"/>
    <!-- For Switching to Production, comment out the line above and uncomment the line below -->
    <!--<img src="https://payments.amazon.co.uk/gp/cba/button?type=cart&cartOwnerId=A26EWWDRC3144Y&color=orange&size=large&background=white"/>-->
</div>
<script type='text/javascript'>
  new CBA.Widgets.StandardCheckoutWidget({
    merchantId:'A26EWWDRC3144Y',
    orderInput: { 
        format: "XML",
        value: "type:merchant-signed-order/aws-accesskey/1;order:PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48T3JkZXIgeG1sbnM9Imh0dHA6Ly9wYXltZW50cy5hbWF6b24uY29tL2NoZWNrb3V0LzIwMDktMDUtMTUvIj48Q2FydD48SXRlbXM+PEl0ZW0+PFNLVT5SZWRGaXNoMTIzPC9TS1U+PE1lcmNoYW50SWQ+QTI2RVdXRFJDMzE0NFk8L01lcmNoYW50SWQ+PFRpdGxlPlJlZCBGaXNoPC9UaXRsZT48RGVzY3JpcHRpb24+QSByZWQgZmlzaCBwYWNrZWQgaW4gc3ByaW5nIHdhdGVyIChDQkEgU3RhbmRhcmQgQ29kZSBHZW5lcmF0b3Igc2FtcGxlIGNhcnQpLjwvRGVzY3JpcHRpb24+PFByaWNlPjxBbW91bnQ+MTkuOTk8L0Ftb3VudD48Q3VycmVuY3lDb2RlPkdCUDwvQ3VycmVuY3lDb2RlPjwvUHJpY2U+PFF1YW50aXR5PjE8L1F1YW50aXR5PjwvSXRlbT48L0l0ZW1zPjwvQ2FydD48L09yZGVyPg==;signature:2GzC+4PwRfqWnoaNd+tCTt8BS6I=;aws-access-key-id:AKIAI2JERC2EEOIC2OYA"},
        buttonSettings: { size: 'large',color:'orange',background:'white'}
  }).render("cbaButton1");
</script>
Where do I insert it so it's shown near the Ecwid checkout button?
Hello,

Each payment option in Ecwid is much more than just a button: Ecwid collects all customer info and item details, sends an order data to payment gateway upon customer confirmation, receive callbacks from the gateway, process them and change order status accordingly. There is also a lot of the other operations happening in background of each of those steps.

It is of course possible to integrate any custom payment gateway with your Ecwid store, but that would require a custom application on your server - that is a task of a custom programming. More details: http://kb.ecwid.com/w/page/49187841/...aymentgateways

But I am afraid it's not possible to add a custom payment option to your Ecwid store just by placing a button in some part of the store page. Even if you added that code to your store and the button displayed there, it wouldn't integrate with your store in appropriate way.
__________________
Matt K
Ecwid Team

Ecwid Guide for Beginners

Ecwid Help Center

Ecwid video tutorials
  #3  
Old 11-14-2013, 08:35 AM
Aamir Razaq's Avatar
Aamir Razaq Aamir Razaq is offline
Junior Member
 
Join Date: Nov 2013
Posts: 8
Default

Quote:
Originally Posted by Makfruit View Post
Hello,

Each payment option in Ecwid is much more than just a button: Ecwid collects all customer info and item details, sends an order data to payment gateway upon customer confirmation, receive callbacks from the gateway, process them and change order status accordingly. There is also a lot of the other operations happening in background of each of those steps.

It is of course possible to integrate any custom payment gateway with your Ecwid store, but that would require a custom application on your server - that is a task of a custom programming. More details: http://kb.ecwid.com/w/page/49187841/...aymentgateways

But I am afraid it's not possible to add a custom payment option to your Ecwid store just by placing a button in some part of the store page. Even if you added that code to your store and the button displayed there, it wouldn't integrate with your store in appropriate way.
Yet it should be as simple as creating the button as it only redirects the customer to processing his payment and that operation is connected to the merchant account.

On this page here:
https://payments.amazon.com/business/html-button

They state you just need to insert the HTML code of the button.
"Integrate easily. Activate Amazon Payments on your website with simple copy-and-paste HTML."
It's just a redirection, I don't need to code complete integration within Ecwid there. I just wanted to know where exactly in the code Ecwid 'checkout' button is. Please provide this information so I can at least run tests and see if you're right or wrong. And if you're wrong, why is the Amazon deceiving their clientelle?

Excuse me, but do I really have to wait for 2-3 days each time for a response from support team?

Last edited by Makfruit; 11-18-2013 at 07:03 AM.
  #4  
Old 11-18-2013, 09:28 AM
Matt Ecwid's Avatar
Matt Ecwid Matt Ecwid is offline
Ecwid Team
 
Join Date: Oct 2011
Posts: 4,947
Default

Quote:
Originally Posted by Aamir Razaq View Post
Yet it should be as simple as creating the button as it only redirects the customer to processing his payment and that operation is connected to the merchant account.

On this page here:
https://payments.amazon.com/business/html-button

They state you just need to insert the HTML code of the button.
"Integrate easily. Activate Amazon Payments on your website with simple copy-and-paste HTML."
It's just a redirection, I don't need to code complete integration within Ecwid there. I just wanted to know where exactly in the code Ecwid 'checkout' button is. Please provide this information so I can at least run tests and see if you're right or wrong. And if you're wrong, why is the Amazon deceiving their clientelle?

Excuse me, but do I really have to wait for 2-3 days each time for a response from support team?
Hello,

Sorry if my answer confused you. You're surely right that it won't take much effort or time to create a button that will simply redirect a customer to an external web site. And that's exactly what Amazon said in their instruction. Such buttons (there is a similar PayPal solution) are often used on the sites that do not have any shopping cart solution. For example, you can create a page on your site with your product description and add the button to that page, which will redirect a customer to Amazon for payment. All order reports and invoices are available on Amazon side. So, in this case, Amazon is not only a payment. Rather is it a shopping cart.

In most cases, such buttons are item-specific, i.e. you will need to generate a button for each product separately: https://images-na.ssl-images-amazon....rted_Guide.pdf

So, to answer your question in general:
1) If you want to add the button to a separate page of your site, you will need to add the button code into that page code
2) If you want to add the button to the shopping cart page, you will need to create a custom script that will track store pages opening and add a button to the current page when it's shopping bag screen. There is no easier way to do that, unfortunately (there is no place to simply add a custom HTML code to display it on particular page). The thing is you cannot change Ecwid HTML because it is not hosted on your site (Ecwid is a SaaS solution that is delivered to your site dynamically through AJAX).

The button will work as they specified, you can surely add it to your site. I don't think there is much sense to add it to Ecwid cart page on your site though since such integration will not be anyhow connected with your Ecwid store:
1) As far as I understand, your should specify items and total cost right in the button HTML code, but in your store you will not know that info in advance (before a customer actually adds something to the cart). Thus the button will not dynamically react on customer cart contents unless you create a script that will alter the button code accordingly each time a customer update shopping cart contents
2) After a customer is redirected from your store to payment, they will simply abandon Ecwid checkout in terms of Ecwid - you won't see an order or customer info in your Ecwid control panel since Amazon will not send any 'callback' to Ecwid. To implement a solution that makes the Amazon button 'know' what's in the cart and makes Ecwid 'know' the status of payment, an extra application on your server will be necessary - that app will act as a bridge between Ecwid and Amazon.

Please let me know if you have any question.
__________________
Matt K
Ecwid Team

Ecwid Guide for Beginners

Ecwid Help Center

Ecwid video tutorials
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:37 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.