Re: Simple Visa Checkout Button doesn't work

fuerzaenti
Regular Visitor

Simple Visa Checkout Button doesn't work

Hello everybody..

I just want to get started with Visa Checkout.

I created aproject and selected just Visa Checkout so I have my ApiKey from the Credentials tab that have Status Active and type Shared Secret. But in Summary tab I got 5 different APIs that all of them says Activation in progress.

 

I already have my html / js code like the docs and replaced my apiKey but it always get the error 401: Invalid Api Key

<html>
<head>
 <script type="text/javascript">
  function onVisaCheckoutReady(){
  V.init( {
  apikey: "MY_OWN_KEY_FROM_CREDENTIALS_TAB",
  paymentRequest:{
    currencyCode: "USD",
    subtotal: "11.00"
  }
  });
V.on("payment.success", function(payment)
  {alert(JSON.stringify(payment)); });
V.on("payment.cancel", function(payment)
  {alert(JSON.stringify(payment)); });
V.on("payment.error", function(payment, error)
  {alert(JSON.stringify(error)); });
}
</script>
</head>

<body>
<img alt="Visa Checkout" class="v-button" role="button"
src="https://sandbox.secure.checkout.visa.com/wallet-services-web/xo/button.png"/>
<script type="text/javascript"
src="https://sandbox-assets.secure.checkout.visa.com/
checkout-widget/resources/js/integration/v1/sdk.js">
</script>
</body>
</html>

What I'm doing wrong?? I have missed something?? Are there anything else I have to do??

Please help me.. 

3 REPLIES 3
API_Products
Visa Developer Support Specialist

Re: Simple Visa Checkout Button doesn't work

Hi @fuerzaenti,

 

To resolve the activation issue, please try the following steps:
 
1. Refresh browser page a couple of times
2. Refresh status
3. Delete the APIs and then add the APIs again
    * Log into your project dashboard and then on the right side click on the "Add API" button and select any other API to add.        After another API is added to the project, you will now have an option to "Delete" the API that is currently not activated. Click on "Delete" and then have all un-activated APIs deleted. After that, click on the "Add API" button and re-add the APIs that you want in the project by selecting its checkbox and scrolling down to click on "Confirm Changes". Deleting and re-adding the APIs that were previously not activated, will most likely resolve the activation issue you are experiencing. You can now delete the other APIs that you do not need in this project and keep only the APIs that you need.
4. Create new project

 

To resolve the 401 Invalid Api Key issue, we need to identify if this is a credential issue. Follow the steps in the API Key – Shared Secret (x-pay-token) for Visa Checkout guide using this link - https://developer.visa.com/pages/apikey_visacheckout, and test whether your credentials are good.

 

If the issue persists, please provide the following information:

1. End Point
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header.

 

 

 

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

aminpaks
Regular Visitor

Re: Simple Visa Checkout Button doesn't work

I'm having similar issue. I tried deleting the project and creating a new one but still getting 402 "Invalid API key" error.

 

Anyone knows what am I doing wrong?

API_Products
Visa Developer Support Specialist

Re: Simple Visa Checkout Button doesn't work

Hey @aminpaks,

 

I'm happy to help resolve your issue and my apologies for the delayed response. Currently, the Visa Checkout team doesn't accept direct merchant, hence, please work with a partner to integrate Visa Checkout into your project. Here's a list of Partners to integrate with Visa Checkout: https://globalcheckout.visa.com/visacheckoutPartners 

 

Please let us know if you have other questions, someone will be happy to help. 

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.