Flow of payment gateway

5 months 3 weeks ago #314685 by rbuelund
I am trying to update a payment gateway so that it can also accept recurring payments, but I am a bit stuck in understandig the flow of the gateway plugin. Could anyone explain how the logic is? Maybe by telling when and from where the functions in the gateway file is called eg: getSinglePaymentRequstParams, getSubscriptionRequstParams, handleReturn, handleCancel, handleNotification

It seems that a single payment has the flow

I do not understand why the getSubscriptionRequstParams is called when it is a single payment ?
5 months 3 weeks ago #314687 by beat
> "I am trying to update a payment gateway"

Can you please be more specific, so that we may help you ?

1. which Payment Gateway are you updating (they have very different internal structures)
2. what exactly are you trying to achieve ? (this may help us tell you if you are looking at the right one)

(the Help us Help You article in "Support" menu has other very useful hints to help better us help you better.  :) )

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
5 months 2 weeks ago #314700 by rbuelund
I am trying to adapt the Quickpay gateway plugin to also accept recurring payments. So far I can get it to register a subscription at Quickpay, but I cannot catch the callback and then trigger the actual payment. I need to understand more of the logic in CBSubs' flow. I have looked at the Worldpay plugin to try to understand - but it might not be the same flow as Quickpay: learn.quickpay.net/tech-talk/guides/subscriptions/#introduction-to-subscriptions

Could you maybe give me some hints to move on ?
5 months 2 weeks ago #314703 by rbuelund
I've now come a little further, but not shure if it is the right way. I can now signup at quickpay for a subscription, then on the response I can trigger a recurring payment, but my problem now is that it needs a new unique order_id - The Subscription order_id and the recurring payment order_id cannot be the same at Quickpay. How does CBSubs handle this ?
5 months 2 weeks ago #314714 by krileon
The order_id for quickpay is whatever the prefix you have configured in the gateway plus the basket id. The prefix is removed on processing leaving just the basket id allowing the order to match and pay the correct basket. When a gateway requires this behavior and has similar for unique subscription payments you need to generate an incremented order_id and strip away the increment during processing. Probably just a matter of improving the _prepareOrderID function.

I don't recommend doing any of this though and simply use Stripe which already has nearly all of Stripes features implemented and is significantly more secure for your users as payment information never touches your server.

Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
5 months 2 weeks ago #314728 by rbuelund
I don't se why Strip is more secure - payment details are entered in a quickpay window and not on the website server - so what is the difference ??
Anyway - I have gotten it to work now. Only thing I need now is to catch the triggering of a new recurring payment. So what I need to know is what this URL exactly does:


Right now nothing happens when I use it - which method should it trigger in the payment gateway ?
Moderators: beatnantkrileon
Time to create page: 0.536 seconds

Facebook Twitter LinkedIn