Anyone implement Sagepay/Opayo/Elavon integration ...
# help-with-umbraco
m
Not specifically an Umbraco question, hope it's ok. Just wondering has anyone had any experience of SagePay or Opayo recently. We have a small form on a U7 site which needs to be recreated on U10 site using SagePay Form Integration. There is this simple form for paying invoices, which then creates a hidden form with crypt and then goes to SagePay and returns a txCode. In the old VS project there are SagePay files that look like they came from SagePay, and a SagePayIntegration.dll file. **I am trying to find, either in their documentation or from Opayo/Elavon, whether there exists any updated version of this. **The controllers in our project use these files and tbh I'm not sure how to get around using them. Nuget has a SagePayIntegration Package but it hasn't been updated since 2018 I haven't tried installing this yet but plan to install it on a cloned solution later on this afternoon. So just wondering if anyone has implenmented this type of thing recently. The people on the help email aren't particularly helpful. Thanks!
h
we use SagePay/Opayo , I will try and dig out some code for you later , pretty sure we don't use any files from sagepay, it just calls their API
m
That would be great thanks - it is entirely possible that I am overthinking this but am just basing it on what is currently existing in the U7 site. Have been pulled away to another project for now but will have another look later on. Thanks
m
Only getting back to this now. Opayo got back sayign there was a kit, I'm not insane, but they don't do it anymore. So at least I know I'm not missing something I need. Thanks a million for that code - it's very different to what we were doing but I'll check it out later on and hopefully can get things sorted, thanks again!
h
Just shout if you get stuck and I'll try my best to assist (if I can 😃)
m
Hi, I am only getting back to this now. I have my form set up and am sorting out the SurfaceController handling. I have made some modifications to your code to fit in with our set up. Just a couple of questions, if that's ok? Are you using this Opayo integration? https://www.opayolabs.co.uk/OpayoDemo/insurance?showpost=off? Our original code was using the Form set up - https://www.opayolabs.co.uk/OpayoDemo/nonprofit?showpost=off - which involved a Crypt field. I'm not 100% sure we don't need to still use this but I'm hoping not. PaymentDetails - is that a View Model? I have changed it to the form view model used in the View Component? What is details.GetData() doing? at the end of the string data = .... line? I'm thinking it must be getting customer name, email etc as I don't see that information anywhere else?
Thanks!
Oh and if I have a form in a View Component which sends to the SurfaceController on submit, where is the iframe and how do i get the Opayo url to open in it? This might be the kind of thing that just occurs to me over lunch, afk, but can't think of it right now. Thanks!
h
GetData returns a querystring with all the billing and delivery address details
I don't think we use either of those, we simply call a url live.sagepay.com/gateway/service/ with a load of parameters (this is the src for the iframe, it just processes the paymant AFAIK)
m
ok cool, thanks!!