Developing Custom Payment Gateway

   —   
In this webinar Miro describes the way of developing custom payment gateway. It is nicely shown on a real life example with loads of code samples.
Share this article on   LinkedIn Google+

Miro Remias

Hi, I am a Product Management Team Lead here at Kentico. My missions i to lead, advise and empower our Product Management team in seeking the product-market fit.

Comments


kentico_josefd commented on

Hello Malic,

I am sorry to hear about your trouble.

I have checked the code base, and I can see that the ShoppingCartInfoObj property is still part of the CMSPaymentGatewayProvider, so you should be able to use it in you Payment provider class as usual.

If your code is not part of a Payment provider, but is instead placed in one of the checkout steps, you can use ShoppingCart property instead of the removed ShoppingCartInfoObj.

If you have you further questions you can contact our support team at: support@kentico.com

malic.vann-intelident commented on

Miro,
In transitioning from 7 to 8.2, inside my custom payment form I am having an issue checking/getting the orderID of an order that has been pre-authorized. In Kentico 7 I got the orderID during the page load the following way:
'OrderInfo orderinfo = OrderInfoProvider.GetOrderInfo(ShoppingCartInfoObj.OrderId);'

In Kentico 8.2, I get the following code error for "ShoppingCartInfoObj":
'The name "ShoppingCartInfoObj" does not exist in the current context.'

Since we run the payments when we ship the items (we just pre-auth during the customers transaction), we need to be able to use the token we save when we process the order in the admin. Without the orderID I can't get the token. It says "ShoppingCartInfoObj" was removed, so how can I get my orderID in Kentico 8 from the payment form (in the admin)?

kentico_mirekr commented on

Hi KC,

Yes, conceptually this should be still working, but since there were several API changes between Kentico 7 and 8.2, we would strongly recommend to follow the most recent documentation on how to develop custom payment gateway.

For example, there is no need to use WorldPayLoader.cs class file from this webinar code samples anymore, since you can register your payment gateway class directly in its code as explained here:

https://docs.kentico.com/display/K82/Creating+a+custom+payment+gateway

Unlike in my example where I was using GetPaymentDataForm() method to load the payment gateway form control, you can just use GetPaymentDataFormPath() method to load the form control by its path.

Thank you!

KC commented on

I created an custom payment gateway from this video. If I install a parallel copy of Kentico 8 (8.2) on the same server as my Kentico 7 and just move over the custom files/directories I created via this video, conceptually, should this work in 8.2?

kentico_mirekr commented on

Hi Chris,

the concept behind developing a custom payment gateway in Kentico 8.1 is still the same compared to previous versions of Kentico, only API changed a bit:

https://docs.kentico.com/display/K81/Creating+a+custom+payment+gateway

Thank you!

Chris commented on

How have things changed in 8.1 in this regard? The example and video show some very different code and UI today.

liquidmagic commented on

The video stops after some 20 minutes of play.
I have tried several browsers from several locations.
Try going forward after the first 30 minutes.

kentico_mirekr commented on

Hi Dimitris,

could you please try some other browser or diferent machine to access the video? I have tried several browsers and it is working just fine for me.

Thanks.

liquidmagic commented on

Hello,

do you have this video anywhere else. It seems that the Youtube video does not work.

Dimitris