Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="ISO-8859-1"?>
- <product productid="onebip" active="1">
- <title>Onebip Payment Module [LITE]</title>
- <description>This product adds a onebip module for the payment APIs</description>
- <version>1.0.1</version>
- <url><![CDATA[]]></url>
- <versioncheckurl><![CDATA[]]></versioncheckurl>
- <dependencies>
- <dependency dependencytype="vbulletin" minversion="3.8.0" maxversion="" />
- </dependencies>
- <codes>
- <code version="1.0">
- <installcode><![CDATA[
- function toggle_subs()
- {
- global $vbulletin;
- $setting = 0;
- if ($check = $vbulletin->db->query_first("
- SELECT paymentapiid
- FROM " . TABLE_PREFIX . "paymentapi
- WHERE active = 1
- "))
- {
- if ($check = $vbulletin->db->query_first("
- SELECT subscriptionid
- FROM " . TABLE_PREFIX . "subscription
- WHERE active = 1
- "))
- {
- $setting = 1;
- }
- }
- if ($setting != $vbulletin->options['subscriptionmethods'])
- {
- // update $vboptions
- $vbulletin->db->query_write("
- UPDATE " . TABLE_PREFIX . "setting
- SET value = '$setting'
- WHERE varname = 'subscriptionmethods'
- ");
- build_options();
- }
- }
- $db->hide_errors();
- $apisettings = array(
- "obaccount" => array("type" => "text", "value" => "your_onebip_account", "validate" => "string")
- );
- $api = array(
- "title" => "OneBip",
- "active" => 1,
- "classname" => "onebip",
- "currency" => "usd,gbp,eur,aud,cad",
- "recurring" => 0,
- "settings" => serialize($apisettings),
- );
- $db->query_write(fetch_query_sql($api, 'paymentapi'));
- toggle_subs();
- $db->show_errors();]]></installcode>
- <uninstallcode><![CDATA[
- function toggle_subs()
- {
- global $vbulletin;
- $setting = 0;
- if ($check = $vbulletin->db->query_first("
- SELECT paymentapiid
- FROM " . TABLE_PREFIX . "paymentapi
- WHERE active = 1
- "))
- {
- if ($check = $vbulletin->db->query_first("
- SELECT subscriptionid
- FROM " . TABLE_PREFIX . "subscription
- WHERE active = 1
- "))
- {
- $setting = 1;
- }
- }
- if ($setting != $vbulletin->options['subscriptionmethods'])
- {
- // update $vboptions
- $vbulletin->db->query_write("
- UPDATE " . TABLE_PREFIX . "setting
- SET value = '$setting'
- WHERE varname = 'subscriptionmethods'
- ");
- build_options();
- }
- }
- $db->hide_errors();
- $db->query_write("DELETE FROM " . TABLE_PREFIX . "paymentapi WHERE classname = 'onebip'");
- toggle_subs();
- $db->show_errors();]]></uninstallcode>
- </code>
- </codes>
- <templates>
- <template name="subscription_payment_onebip" templatetype="template" date="1294078080" username="R3tr0s" version="1.0"><![CDATA[
- <input type="hidden" name="command" value="standard_pay" />
- <input type="hidden" name="username" value="{vb:raw account}" />
- <input type="hidden" name="description" value="{vb:rawphrase x_subscription, {vb:raw subinfo.title}}" />
- <input type="hidden" name="item_code" value="{vb:raw item}" />
- <input type="hidden" name="price" value="{vb:raw cost}" />
- <input type="hidden" name="currency" value="{vb:raw currency}" />
- <input type="hidden" name="return_url" value="{vb:raw vboptions.bburl}" />
- <input type="hidden" name="cancel_url" value="{vb:raw vboptions.bburl}" />
- ]]></template>
- </templates>
- <plugins>
- </plugins>
- <phrases>
- <phrasetype name="Subscription Tools" fieldname="subscription">
- <phrase name="onebip" date="1294078080" username="R3tr0s" version="1.0"><![CDATA[Onebip]]></phrase>
- <phrase name="onebip_order_instructions" date="1294078080" username="R3tr0s" version="1.00"><![CDATA[To pay for your subscription using <a href="http://www.onebip.com" target="_blank">Onebip</a> click the button below and follow the onscreen instructions. <b>Onebip Module powered by <a href="http://www.sciax2.it/forum/" target="_blank">R3tr0s</a></b> ]]></phrase>
- <phrase name="setting_onebip_obaccount_desc" date="1294078080" username="R3tr0s" version="1.00"><![CDATA[Please enter your Onebip email]]></phrase>
- <phrase name="setting_onebip_obaccount_title" date="1294078080" username="R3tr0s" version="1.00"><![CDATA[Onebip Email]]></phrase>
- </phrasetype>
- </phrases>
- <options>
- </options>
- <helptopics>
- </helptopics>
- <cronentries>
- </cronentries>
- <faqentries>
- </faqentries>
- </product>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement