PaymentResult - Custom Gateway

Antonio Developer asked on June 30, 2017 11:05

Hello everybody

I created a custom gateway and want to know if I have to implement the Payment Result in my codebehind. In my ProcessPayment Method (Provider class) I redirect to the custom gateway url. Do I have to set/create a paymentresult after my redirect? I havent find any relevant informations about...

Recent Answers


Trevor Fayas answered on June 30, 2017 16:27 (last edited on June 30, 2017 16:28)

I'm not sure what you mean by "Payment Result" in your code behind.

Part of a Payment gateway is you need to define where the Payment Form Control (ascx) is defined, the system uses this control to allow the user to enter things like their Credit Card information or any information needed for the ProcessPayment method to function.

How it works though is you define a page in Kentico that is the "Payment Page" and include the webpart "Payment Form"

The Ecommerce, when sending a user to this page, sends the payment method to the Payment form which in turns loads the ASCX control for that payment method.

Part of the "Payment Form" Web part is the "Thank you Page Url" that a user is sent to after they are done, so this is separate from the Custom Payment Gateway itself. You can use this as the "Payment results" if you wish.

Does that make sense?

0 votesVote for this answer Mark as a Correct answer

Antonio Developer answered on June 30, 2017 16:48 (last edited on June 30, 2017 16:48)

Hey Trevor

My question is where I implement the return to my webshop when I have redirected the user to a custom gateway. I found the PayPalIPN.aspx and PayPalIPN.ascx.cs Files. For me its sounds like this files handle the payment result... Do I need these files and When is this IPN.ascx file called?

I dont quite understand the connections..

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on June 30, 2017 16:52 (last edited on June 30, 2017 16:55)

Now i follow you. For the payment gateways that a user is directed to a 3rd party site, it's pretty much the responsibility of the 3rd party to send them back.

For Paypal, when you configure your paypal account, you specify the return URL for your payment page on Pay Pal itself.

Some external partners may specify that you include a return URL when you send the user to them, but this will change depending on the partner.

So check your Paypal settings! In there it should specify the return address.

https://www.paypal.com/cgi-bin/webscr?cmd=p/mer/express_return_summary-outside

0 votesVote for this answer Mark as a Correct answer

Antonio Developer answered on June 30, 2017 17:16

Thank you for your fast answers! Now I can follow you too!

When the payment is finished the external partner redirect the user to the Thank you page or to the payment canceld page. But also I have to use the xxx IPN to set the payment result. And than my Provider Class updates the Orderstatus, right? So when is the xxx IPN called? Do i specify the url to the thank you page or to the IPN Page?

0 votesVote for this answer Mark as a Correct answer

Development Support answered on June 30, 2017 17:53 (last edited on June 30, 2017 17:53)

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on June 30, 2017 17:54

I believe the xxx IPN is called once the payment is approved, then it sends a message to that IPN to say "hey, this order here is paid" or what not.

My buddy ben just set up a PayPal, the IPN is specified in Kentico, it probably passes it to Paypal itself.

Settings > Ecommerce > Payment Gateway > PayPal > Notify Url

0 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on June 30, 2017 18:12

My 2 cents: IPN - this Instant Page Notification - this server-to-server callback from Paypal server to your server (user is not involved). PaymnentResultInfo - is the default Kentico class that describes the payment (completed/declined etc). You can extend it if you need you own methods/properties, but the default one is good enough in the beginning. It depends of what Paypal products you are using. If you redirect user to paypay to make a payment - you need to specify a return page where user will be redirected back from Paypal after transaction is completed.

0 votesVote for this answer Mark as a Correct answer

Antonio Developer answered on July 3, 2017 12:12

"..you need to specify a return page where user will be redirected back from Paypal after transaction is completed" - OK! But where can I specify the URL (Returnpage) for my custom Gateway?

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on July 3, 2017 15:41

https://www.paypal.com/cgi-bin/webscr?cmd=p/mer/express_return_summary-outside

0 votesVote for this answer Mark as a Correct answer

Antonio Developer answered on July 3, 2017 16:16

Not for PayPal..My Question is How can I set the the URL for my PNPage (Returnpage) for my Third Party Gateway.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.