![]() |
Adding a new payment processor
I need to add a new payment processor. I am sure this has been done many times by many people. Sure wish vbulletin had a better forum search facility, because the answer must already be here.
But I don't dare even look. I'll get distracted by some other lovely toy, and there goes my effort! Here I am going to just talk aloud, and document as I go. Perhaps someone will interrupt and send me to the proper place. Otherwise, maybe another can make use of this information. Honestly, if I tell you guys what I am doing, as I do it, sometimes it helps me avoid the really stupid mistakes. Then again, sometimes not. Enough editorial. Intended audience has some php/hacking experience. This is not a job for the rank novice. Watch me bleed. Going to add two new processors. First stop: admin/functions_subscriptions.php Find and modify: PHP Code:
For the bit values I choose increasing powers of two: after 32 comes 64, 128,512,1024... and if you have that more payment processors you surely have a calculator. Next stop, using phpMyAdmin, I find the record in vb_settings where grouptitle='subscriptions' I change the value for 'value' from 4 to 6, and I replace the value for 'optioncode' with the following. PHP Code:
Next stop: admin/functions_subscriptions.php (again). inside function construct_payment() there is a switch statement. I need to add two more cases. Eg: PHP Code:
So far so good. I am seeing me different payment methods in the admincp, and when I buy a subscription. Only I'm not seeing a name for the button 'Orde using...'. Oh crud. Now I need a phrase. And so ends today's lesson in getting started with a new payment processor. Those of you who can point me to existing threads, or otherwise provide documentation or encouragement: many thanks in advance. |
No wonder so many of my users hate vb.
I've been using it for over six months now, and here I am, wondering how to edit my own darn post. Grr! And clearly I've posted in the wrong forum. Oh well. Maybe another day it will be obvious to me. Meantime, I have foolishly posted something I am incapable of editing or deleting. Moderator assistance if and when possible please. |
Still just finding where to make the mods....
The phrase search ends at a hard-coded array in forum/subscriptions.php PHP Code:
http://www.mysite.com/forum/subscriptions/inhouse.php and http://www.mysite.com/forum/subscriptions/inhouse.php Now I'm ready to take an existing script from the subscriptions directory, rename it as inhouse.php or plugnpay.php, modify to accept the return values, and I might be done. Cheers |
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=66949" target="_blank">https://vborg.vbsupport.ru/showt...threadid=66949</a>
same thing released before by kall. |
Quote:
vB Version: 3.0.3 Mod Version: 1.00 Supported DB Changes Installer included Release: 07. Jul 2004 Installs: 5 Last Update: Never Rating: At least he is trying to upgrade it from 3.0.3 to 3.0.7 so do not knock him for doing this :ogre: |
there is no change from 3.0.3 the subscription info never changed
|
Quote:
|
Hehe, same here :D
|
Quote:
Thank you for pointing out that I had it set at 3.0.3 though. You may not realise, having not released anything yourself, that this is a dropdown box, with no option to select 'various versions from 3.0.3 up'. Twoseven is also right in saying there have been no changes to the system since my release, so that release still applies. |
Your release not only still applies, but you did it without all the whining and crying. And you found one final phrase that I did not. People trying to simply make the change should definitely follow your thread.
Kall shows different ways of making the mods: something about turning on debug and using the address bar to modify a setting. Even more potentially useful information. I didn't quite understand I was "releasing" something here, I was just posting a whiner. We all have our days. There is nothing to release. It's just a few steps to follow. So long as the threads are cross-linked, another may have twice the chance of understanding or learning. Or finding it in the first place. Alert here's something curious. If you start with an existing subscriptions ipn (instant payment notification) module, you may find it includes init but not global. Where do people define their group ids eg define('MYGROUP', 13). I would have guessed global.php Other steps Many processors require a unique transaction identifier. I found I had to create a table. When the purchase was confirmed, write the userid and get an insert id. The subscription table itself will not do. Now, if a cookie has expired when the IPN is received, you still have the insert id, and can recover the transaction details. I saved everything the processor sent: PHP Code:
Also in this table, a COMPLETE status. If you try to complete a transaction that is already complete, you know somebody is hacking... or more likely, the payment processor is acting up, and users are desperately re-trying. Beats extending the subscription eight times. And provides a useful audit trail. There's another difficulty for adult ("stupid") sites. Presenting all those payment methods is confusing for some people. Better to guide them one at a time, first through your main processor, then try for the others. I'm not done yet! Appreciate the feedback. |
All times are GMT. The time now is 06:16 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|