Skip to Content Skip to Menu

Flow of payment gateway

  • rbuelund
  • rbuelund
  • OFFLINE
  • Posts: 565
  • Thanks: 40
  • Karma: 4
5 years 1 month ago #314685 by rbuelund
Flow of payment gateway was created 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
getSinglePaymentRequstParams
getSubscriptionRequstParams
handleNotification
handleNotification
handleReturn

I do not understand why the getSubscriptionRequstParams is called when it is a single payment ?

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
5 years 1 month ago #314687 by beat
Replied by beat on topic Flow of payment gateway
> "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

Please Log in or Create an account to join the conversation.

  • rbuelund
  • rbuelund
  • OFFLINE
  • Posts: 565
  • Thanks: 40
  • Karma: 4
5 years 1 month ago #314700 by rbuelund
Replied by rbuelund on topic Flow of payment gateway
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 ?

Please Log in or Create an account to join the conversation.

  • rbuelund
  • rbuelund
  • OFFLINE
  • Posts: 565
  • Thanks: 40
  • Karma: 4
5 years 1 month ago #314703 by rbuelund
Replied by rbuelund on topic Flow of payment gateway
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 ?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48534
  • Thanks: 8290
  • Karma: 1445
5 years 1 month ago #314714 by krileon
Replied by krileon on topic Flow of payment gateway
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 - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
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 CST to 4:00 PM CST. 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.

Please Log in or Create an account to join the conversation.

  • rbuelund
  • rbuelund
  • OFFLINE
  • Posts: 565
  • Thanks: 40
  • Karma: 4
5 years 1 month ago #314728 by rbuelund
Replied by rbuelund on topic Flow of payment gateway
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:


xxxxxxx.dk/index.php?option=com_comprofiler&task=pluginclass&plugin=cbpaidsubscriptions&do=autopayments&key=d41d8cd98f00erf4e9800998ecf8427e&format=raw

Right now nothing happens when I use it - which method should it trigger in the payment gateway ?

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum