I am getting an error while implementing visa cyber source using c# code and I have downloaded source code for that after creating a project but getting error may be x-pay-token was not generating correctly. Is there any way so I can verify my token or generate it with any API by passing parameter. Below code, I am using
string baseUri = "cybersource/";
string resourcePath = "v2/payments";
string xPayToken = GetXPayToken(resourcePath, "apikey=" + apikey, requestBodyString);
private static string GetXPayToken(string apiNameURI, string queryString, string requestBody)
string timestamp = GetTimestamp();
string sourceString = timestamp + apiNameURI + queryString + requestBody;
string hash = GetHash(sourceString);
string token = "xv2:" + timestamp + ":" + hash;
private static string GetHash(string data)
string sharedSecret = ConfigurationManager.AppSettings["VisaPaySharedSecret"];
var hashString = new HMACSHA256(Encoding.ASCII.GetBytes(sharedSecret));
var hashbytes = hashString.ComputeHash(Encoding.ASCII.GetBytes(data));
string digest = String.Empty;
foreach (byte b in hashbytes)
digest += b.ToString("x2");
After meeting with CyberSource, we have come to learn that VDP generated Merchant ID’s will experience an unresolvable gateway issue.
The EBC error message: The payment processor gateway name is either invalid or missing
Currently, the only method to properly query the CyberSource Payments sandbox is creating a merchant account directly with CyberSource:
Luckily, their site also provides an easy to use method to test their account credentials:
Additionally, here are the following links for sample code: https://github.com/CyberSource/cybersource-rest-samples-java/blob/master/src/main/java/samples/payme...
Thank for your consideration,
Can you please elaborate where should I start
1. Do I need to register with the cyber source?
2. Is all the transaction, will I able to see them on the visa dashboard?
3. If I do transactions with Cyber source where is the role of visa developer?
4. Is x-pay-token generated by me is correct or not or can I verify it?
5. Are you able to find my failed transaction?
6. Why I am not getting the exact error message?
7. For API Url -
and I am using below code for generating x-pay-token is it correct or not
string baseUri = "cybersource/"; string resourcePath = "v2/payments";
There's an expert team that manages questions specific to CyberSource. Please call CyberSource Support at 800-709-7779.