Re: Regarding Visa Checkout Integration.

sknanajkar
Regular Visitor

Regarding Visa Checkout Integration.

I am Sagar, We are trying to build Visa checkout Integration in our website. We have followed the below procedure, 

 

1. We are working visa checkout with authorize.net

2. We have generated an API key through the authorize.net 

 

Visa checkout API Key - IWEQ158IDG79GQV7NL5S21b7stAJM4Bp9v7WA6J1_R4PHQnsw

 

Screenshot_81.pngScreenshot_80.png

 

3. Implemented Javascript code as well as mentioned in the link -  https://www.authorize.net/content/dam/authorize/documents/VisaCheckoutGettingStartedGuide.pdf  

4. We are getting a visa checkout button and when we click on visa checkout it open fancy box after entered all payment details (card detail) and address.

5. Currently, we have added test credit cards, After submitting the continue button we are getting a response from visa checkout with below parameters, 

 

- CallId

- encKey

- encPaymentData



 

3.png

 

 

 

4.png

 

6. When I tried to decrypt the encPaymentData,  I have seen the credit card number is not coming in card info object. 

 

Could you please let me know why the credit card number is not coming in the response in parameter encPaymentData.

Is there is any setting or configuration we need to do?

Thank you In advance! Please help.

 

Thank you

 

 

 

5 REPLIES 5
API_Products
Visa Developer Support Specialist

Re: Regarding Visa Checkout Integration.

Hey @sknanajkar,

 

That's a good question! I'll take a look and get back to you soon.

 




Thanks,

Tee



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

sknanajkar
Regular Visitor

Re: Regarding Visa Checkout Integration.

@DiabaTran-Yee

Thank you, Please let me know your findings.

Re: Regarding Visa Checkout Integration.

Hello,

 

What method are you using to decrypt the encPaymentData?

You must decrypt the consumer information payload on a secure server. Ensure that the dynamic encrypted key, encKey, and the encrypted payload, encPaymentData, from the response are on your secure server. You will also need the shared secret associated with your encryption key (encryptionKey) on your secure server.

 

Visa Checkout provides code in several languages that you can use to decrypt the payload
using the prerequisite fields. An example in Java is below:

public static byte[] decryptPayload(byte[] key, byte[] wrappedKey, byte[] payload) throws GeneralSecurityException {
       byte[] unwrappedKey = decrypt(key, wrappedKey);
       return decrypt(unwrappedKey, payload);
}

String sharedSecret = "YOUR_SHARED_SECRET";
String encKey = "YOUR_ENC_KEY";
String encPaymentData = "YOUR_ENC_PAYMENT";

decryptPayload(sharedSecret.getBytes(), encKey.getBytes(), encPaymentData.getBytes());

 



Powered by NexWebSites.com
sknanajkar
Regular Visitor

Re: Regarding Visa Checkout Integration.

 

 

Hi

 

I am using authroize.net API to decrypt the data, and I am able to decrypt data. But on decrypted payment data I could not see card number. 

I have resolved it by 

Change data-level ="FULL" in Visacheckout javascript code. Now I am getting card number in response. 

 

Thank you

Sagar

API_Products
Visa Developer Support Specialist

Re: Regarding Visa Checkout Integration.

Hey @Nexus_Software,

Thanks for your help in troubleshooting the issue, that was brilliant!

 

Hey @sknanajkar,

Excellent job on finding the root cause of the issue and sharing how the issue was resolved! 

 

Happy New Year to you both 😊 

 




Thanks,

Tee



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