VivaPayments / API

Index of Viva Wallet open source projects on GitHub.
139 stars 162 forks source link

Issue update webhook endpoint (frontend) #2335

Closed IperGiove closed 1 year ago

IperGiove commented 1 year ago

Hi, I add here an issue about the webhook page, an error it is returned when you try to add a webhook endpoint. The payload of the POST request sanded from the frontend to https://www.vivapayments.com/selfcare/it/security/updatewebhook is: IsNew=True&Id=0&Url=my_url&IsActive=true&IsActive=false&EventTypeId=1796&X-Requested-With=XMLHttpRequest The response back is a GET: https://www.vivapayments.com/error500.html?aspxerrorpath=/selfcare/it/security/updatewebhook. And the frontend error pop up is: DataTables warning: table id=webhooksResults - Requested unknown parameter '0' for row 2. For more information about this error, please see http://datatables.net/tn/4

VivaWalletCustomerSupport commented 1 year ago

Hello @IperGiove,

Thank you very much for your message. Can you please send us the webhook URL you are trying to verify? Thank you in advance.

Kind regards, Viva Wallet E-commerce Support Team

IperGiove commented 1 year ago

https://cbdispensary.shop/webhook

VivaWalletCustomerSupport commented 1 year ago

Hello @IperGiove,

Thank you for the additional information. Before receiving a webhook notification to your website, you need to create a unique verification code for Viva Wallet to identify you as a merchant. To do this, make a simple GET request to the following API endpoint with basic authentication headers.

Demo Endpoint: https://demo.vivapayments.com/api/messages/config/token Live Endpoint: https://www.vivapayments.com/api/messages/config/token

Each time you enter a new webhook URL via the banking app, you need to verify it (by clicking on the “verify” link next to URL input textbox). This action will start the process of a simple GET http call to your URL. We send this request using TLS 1.2 so your server configuration needs to match that. Your page should print a JSON response such as the one shown below.

{ "Key":"B3248222FDCD1885AEAFE51CCC1B5607F00903F6" }

Kind regards, Viva Wallet E-commerce Support Team

IperGiove commented 1 year ago

Yes, I did the procedure that you described. You do not see the key because I whitelist only the address defined by vivawallet doc. However when I verify the endpoint everything works, the problem it is when i try to save the new endpoint.

image

image

VivaWalletCustomerSupport commented 1 year ago

Hello @IperGiove,

Can you send us the merchant ID of your account so we can investigate the issue further?

Kind regards, Viva Wallet E-commerce Support Team

IperGiove commented 1 year ago

is it a sensitive data? Can I provide it to you from the support email linked the github issue?

VivaWalletCustomerSupport commented 1 year ago

Hello @IperGiove,

Yes of course, you can send it to support@vivawallet.com. As a subject please use Github and the code #2335.

Kind regards, Viva Wallet E-commerce Support Team

VivaWalletCustomerSupport commented 1 year ago

Hello @IperGiove,

We would like to suggest you to try and verify the following webhook:

https://www.cbdispensary.shop/webhook

Also, kindly note that you should not set any redirection from your webhook endpoints to other locations. Otherwise, you may encounter 302 and similar errors, and webhook notifications may not be received successfully.

Kind regards, Viva Wallet E-commerce Support Team

VivaWalletCustomerSupport commented 1 year ago

Hello @IperGiove,

We just wanted to follow up on the reply we send yesterday. We were simply wondering if you read our response.

In any case this ticket will remain active for at least 24 hours, so that you can come back if you wish.

However, if you have any questions, please don't hesitate to reply here and we'd be happy to help!

Kind regards, Viva Wallet E-commerce Support Team

VivaWalletCustomerSupport commented 1 year ago

Hello @IperGiove,

This ticket will close for now. Please don't hesitate to raise a new ticket if you need further assistance.

Kind regards, Viva Wallet E-commerce Support Team