Rank: Member
Joined: 2/14/2008(UTC) Posts: 4
|
Hi everyone,
I just recently purchased BVC5 for use in the Danish market. I've been integrating and adapting the solution into our website the last couple of weeks, but now the time has come to sought out the issue with a new creditcardgateway. In Denmark we cannot use any of the existing gateways that are shipped with BVC5. I'm therefore looking for some help that possibly could solve my headaches.
From looking at the existing ones, e.g. BV AuthorizeDotNet, I figured I could more or less create a new folder named MyGateway and then copy the edit.aspx file from an existing gateway folder and then modify it according to requirements from the new gateway provider.
But I know there must be more to it than that. I figure I need to register it somewhere, making it integrated within the BVC5 solution so that it will appear on the gateway list in Admin section. Just creating a new gateway folder isn't enough - I've already tried it.
Does anyone have an idea about this?
Thanks in advance!
/Jens
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 2,136
Was thanked: 1 time(s) in 1 post(s)
|
Copying an existing editor is a great way to kick start the UI part. To add your custom gateway, edit TaskLoader.Custom.vb in the App_Code directory. For example, if your gateway class is called class is called Jens.Payment, then you would use,
Public Shared Sub LoadCustomCreditCardGateways(ByVal result As Collection(Of Payment.CreditCardGateway))
result.Add(New Jens.Payment())
End Sub |
|
|
|
|
Rank: Member
Joined: 2/14/2008(UTC) Posts: 4
|
Hi Andy,
Thanks for the tip!
I found the TaskLoader.Custom.vb file and the LoadCustomCreditCardGateways method. When you refer to e.g. Jens.Payment you are referring to a dll file that must be located in the Bin directory, right? And, the dll file includes all the business logic required to make it work, e.g. making an authorize or capture .. is this understood correctly? :)
Another thing. I also found the TaskLoader.vb file in the App_code directory. The file contains the method LoadCreditCardGateways() with a list of the currently added gateways. Could I just add my custom gateway there instead of in the TaskLoader.Custom.vb file? Is there any difference?
Regards, Jens
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 2,136
Was thanked: 1 time(s) in 1 post(s)
|
Your gateway class ("Jens.Payment") will need to exist in an assembly, but not necessarily in a DLL in the bin directory. For example, you can just put the source code in the App_Code directory and let ASP.NET compile it for you.
The difference between TaskLoader.vb and TaskLoader.Custom.vb is that TaskLoader.vb may be overwritten when you install a service pack, while TaskLoader.Custom.vb will not. So you could add your custom gateway to TaskLoader.vb, but it may disappear when you install a service pack. |
|
|
|
|
Rank: Member
Joined: 2/14/2008(UTC) Posts: 4
|
Browsing through the CoreSource folder I found the folder BVSoftware.BVC5.Payment.AuthorizeNet. In that folder the AuthorizeNetProvider.vb exists. Am I right when I'm assuming that this file includes all the methods necessary for hooking up BVC5 to Authorize.Net? If so I thought I'd use that file for implementing my own gateway.
Do you think this is a reasonable approach?
Regards, Jens
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 2,136
Was thanked: 1 time(s) in 1 post(s)
|
That sounds like a good approach. |
|
|
|
|
Rank: Member
Joined: 2/14/2008(UTC) Posts: 4
|
Thanks Andy for your input on this!
I'll have a go at it.
Best regards, Jens
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.