Post by kostasper » Mon Dec 22, 2014 5:46 pm

Καλησπέρα

Έχω αγοράσει ένα extension για διασύνδεση με την τράπεζα της eurobank.
Έκανα τα βήματα που μου είπαν στο δοκιμαστικό Gateway url https://euro.test.modirum.com/vpos/shophandlermpi και η διασύνδεση γινόταν κανονικά, όμως όταν ήρθε η ώρα να αλλάξω το url σε https://vpos.eurocommerce.gr/vpos/shophandlermpi μου βγάζει το παρακάτω μήνυμα

Security error, invalid digest.

Είμαι νέος χρήστης στο opencart και δεν ξέρω που μπορεί να οφείλεται αυτό το error.
Η έκδοση του opencart που χρησιμοποιώ είναι ή 1.5.6.4

Newbie

Posts

Joined
Mon Dec 22, 2014 5:33 pm

Post by kostas80 » Tue Dec 30, 2014 3:51 am

Λογικά μαζί με το live url σου δώσαν και καινούριο secret key. Προσοχή στα copy-paste μήπως έχεις αφήσει κάποιο κενό.

Αν με το test url δούλευε κανονικά ενώ με το live όχι, τότε σίγουρα έχεις κανει λαθος στο secret key.

Opencart Extensions
1) Viva Payments
2) Eurobank Cardlink
3) Alpha Bank Cardlink
4) Εντοπισμός Αποστολών Courier
5) Αυτόματη προσαρμογη αποθέματος


New member

Posts

Joined
Wed Sep 19, 2012 3:54 am

Post by botonakis » Mon Jan 12, 2015 9:30 pm

Πρέπει να τους ζητήσεις (από την Cardlink) να σου ενεργοιήσουν τον νέο λογαριασμό και να λάβεις τους νέους κωδικούς γιατί αλλάζουν και καταργούν τους προηγούμενους.

User avatar
Active Member

Posts

Joined
Tue Jan 24, 2012 7:55 pm
Location - Athens, Greece

Post by laxman.singh » Wed Jul 08, 2015 6:07 pm

Είμαι αντιμετωπίζει το ίδιο πρόβλημα.
Έχω επανελέγχονται τα ταμεία στοιχεία (Αναγνωριστικό εμπόρου, κοινό μυστικό και άλλες λεπτομέρειες πληρωμής), αλλά δεν μπορεί να επιλύσει το πρόβλημα αυτό.
Παρακαλώ βοηθήστε.

Attachments

CardLink- issue.PNG

Issue screenshot - CardLink- issue.PNG (20.95 KiB) Viewed 3736 times


Newbie

Posts

Joined
Wed Jul 08, 2015 5:40 pm

Post by botonakis » Wed Jul 08, 2015 9:31 pm

Νομίζω ότι το πρόβλημα σας είναι στον κώδικα του extension.

Επίσης επειδή νομίζω ότι δεν μιλάτε Ελληνικά:
I think your problem is the connection code in the extension.

User avatar
Active Member

Posts

Joined
Tue Jan 24, 2012 7:55 pm
Location - Athens, Greece

Post by laxman.singh » Wed Jul 08, 2015 10:01 pm

@botonakis : Thanks for your reply.
I have rechecked the all checkout details(Merchant ID, Shared secret, and all the payment details), all are correct.

I am implementing this in .Net, and please look the digest generation code below :

private string GenerateDigest(CardLink1Model cardLink)
{
StringBuilder sb = new StringBuilder();

//Concatenating all the mayment details
sb.Append(cardLink.A_MID);
sb.Append(cardLink.B_lang);
sb.Append(cardLink.C_deviceCategory);
sb.Append(cardLink.D_Orderid);
sb.Append(cardLink.E_orderDesc);
sb.Append(cardLink.F_orderAmount);
sb.Append(cardLink.G_currency);
sb.Append(cardLink.H_payerEmail);
sb.Append(cardLink.I_payMethod);
sb.Append(cardLink.J_confirmUrl);
sb.Append(cardLink.K_cancelUrl);
sb.Append(cardLink._Secret);

SHA1Managed sha1 = new SHA1Managed();
string digest = Convert.ToBase64String(sha1.ComputeHash(Encoding.UTF8.GetBytes(sb.ToString())));

return digest;
}

Please look into this, and please let me know if any change is required.

Newbie

Posts

Joined
Wed Jul 08, 2015 5:40 pm

Post by botonakis » Wed Jul 08, 2015 10:25 pm

I think the error is here:
string digest = Convert.ToBase64String(sha1.ComputeHash(Encoding.UTF8.GetBytes(sb.ToString())));
please refer to eurobank's api guide and sample code.

User avatar
Active Member

Posts

Joined
Tue Jan 24, 2012 7:55 pm
Location - Athens, Greece

Post by laxman.singh » Thu Jul 09, 2015 3:51 pm

I think this source code is generating digest correctly because I have checked this with all parameters which are provided in "Cardlink Payment Gateway - Redirect Model Specifications v1.0" doc.

And I have implemented all the things as per this document.

Newbie

Posts

Joined
Wed Jul 08, 2015 5:40 pm

Post by laxman.singh » Wed Jul 15, 2015 2:48 pm

I am a DotNet developer in C#.

While implementing CardLink payment gateway, I am facing the same issue like others to get correct digest, getting "Security error, invalid digest" error on Eurobank screen.

Below code is using to calculate digest :

string digest = Convert.ToBase64String(new System.Security.Cryptography.SHA1Managed().ComputeHash(Encoding.UTF8.GetBytes(normalizedString.ToString())));


Could you please verify/provide the code to get valid digest for Cardlink in C#?

Please do the needful ASAP.
Thanks in advance.

Newbie

Posts

Joined
Wed Jul 08, 2015 5:40 pm

Post by botonakis » Wed Jul 22, 2015 2:57 pm

Could you please verify/provide the code to get valid digest for Cardlink in C#?
Sorry, I have no knowledge in C#..

User avatar
Active Member

Posts

Joined
Tue Jan 24, 2012 7:55 pm
Location - Athens, Greece

Post by laxman.singh » Wed Jul 22, 2015 4:31 pm

botonakis wrote:
Could you please verify/provide the code to get valid digest for Cardlink in C#?
Sorry, I have no knowledge in C#..
No problem botonakis,
Issue is resolved, this is happening because of invalid secret key. Now it is working as expected.

Thanks

Newbie

Posts

Joined
Wed Jul 08, 2015 5:40 pm
Who is online

Users browsing this forum: No registered users and 2 guests