The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Payment API custom modification
Hello,
Basically I made a custom profile field within vbulletin. My Game Servers update the data within the database once they earn something on the servers. I want them to be able to get a paid subscription with these points basically the z-points are the currency and the database is the API processor. Those points are saved within custom profile "field6". Here is the code I have so far: product_zpoints.xml Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <product productid="zpoints" active="1"> <title>Z-Points</title> <description>Add Z-Points to the payment gateway</description> <version>0.0.2</version> <codes> <code version="1.0.0"> <installcode><![CDATA[// Fill the settings array // add the z-points record to the paymentapi table $db->hide_errors(); $db->query_write(" INSERT INTO " . TABLE_PREFIX . "paymentapi (title, currency, recurring, classname, active, settings) VALUES ('Z-Points', 'z-points', 0, 'zpoints', 0, '" . $db->escape_string(serialize($settings)) . "') "); $db->show_errors();]]></installcode> <uninstallcode><![CDATA[$db->hide_errors(); $db->query_write("DELETE FROM " . TABLE_PREFIX . "paymentapi WHERE title = 'Z-Points'"); $db->show_errors();]]></uninstallcode> </code> </codes> <templates> <template name="subscription_payment_zpoints" templatetype="template" date="0" username="JamesGunner" version="3.6.0"> <![CDATA[ <input type="hidden" name="amount" value="$cost"> <input type="hidden" name="test_mode" value="$settings[test_mode]"> <input type="hidden" name="product_name" value="$subinfo[title] Subscription"> <input type="hidden" name="description" value="$subinfo[description]"> <input type="hidden" name="unit_price" value="$cost"> <input type="hidden" name="require_IPN" value="0"> <input type="hidden" name="return_URL" value="$vboptions[bburl]/payment_gateway.php?method=zpoints"> ]]> </template> </templates> <plugins> <plugin active="1" executionorder="5"> <title><![CDATA[Z-Points - add 'order using']]></title> <hookname>paidsub_order_start</hookname> <phpcode><![CDATA[$vbphrase += array( 'zpoints' => 'Z-Points' );]]></phpcode> </plugin> </plugins> <phrases> <phrasetype name="GLOBAL" fieldname="global"> <phrase name="setting_zpoints_test_mode_desc" date="1156824632" username="Hambil" version="1.0.0"><![CDATA[Enable Test Mode. Transactions in test mode are 'fake' and not charged to an account.]]></phrase> <phrase name="setting_zpoints_test_mode_title" date="1156824659" username="Hambil" version="1.0.0"><![CDATA[Test Mode]]></phrase> <phrase name="zpoints_order_instructions" date="1156875116" username="Hambil" version="1.0.0"><![CDATA[To pay for your subscription via Z-Points click the button below and follow the onscreen instructions.]]></phrase> </phrasetype> <phrasetype name="Error Messages" fieldname="error"> <phrase name="zpoints_cancel"><![CDATA[[ZOW] Im sorry! You do not seem to have enough zpoints to get admin or an error occured!]]></phrase> </phrasetype> </phrases> </product> Now I think my problem is the heart of the Payment API, the class file. I really think that I need help with this one. This is what i got so far: class_zpoints.php PHP Code:
Thanks for the reply ahead... |
#2
|
|||
|
|||
nobody can help me?
|
#3
|
|||
|
|||
Hi James,
Do you have this working yet? Question, in this install code: Quote:
|
#4
|
|||
|
|||
hey thanks for you trying to help. We already implemented this after a long time of trying and trying. We ended up making our own currency and whatnot but it seems to work now.
|
#5
|
|||
|
|||
Hi James,
I am working on a similar problem. Can you post your final code? Thanks! |
#6
|
|||
|
|||
anybody have successfully add a local currency?
|
#7
|
|||
|
|||
Yes, but it is a lot of template work.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|