English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: Pretty Basic Coding Question
#4196
Pretty Basic Coding Question 14 Years, 7 Months ago Karma: 0
Hello

So I want to deploy the site as confirmed and I need the payment scripts for further processing tasks. I have quota and plenty of available slots. I have the following code in the Payment script menu item to give me a unique payment reference.
Code:

<?php
$payment_ref = uniqid(rand());
if ( $renew) {
// Put here the code to renew a website
}
else {
// Put here the code when a new website is created
}
?>



Now I want to change the status to 'Confirmed' at the time that the site deploys. I have the following code that is not working in On deploy success menu item.
Code:

<?php
$session       =& JFactory::getSession();
$site_id = $session->get( 'site_id', null, 'contracts');
// Convert the VirtueMart status code into JMS status code
$statusCodes = array( 
'P' => 'Pending',
'C' => 'Confirmed',
'X' => 'Cancelled',
'W' => 'Pending' // Waiting for payment confirmation
);
$order_status = 'Confirmed';
$newStatus = $statusCodes[ $order_status];
require_once( JPATH_ADMINISTRATOR.DS.'components'.DS.'com_multisites'.DS.'classes'.DS.'utils.php');
MultisitesUtils::updateStatus( 'site_id', $site_id, $order_status);
?>



Any tips on how to make this work?

Thanks in advance.
DaveC
Senior Boarder
Posts: 77
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/05/20 16:31 By DaveC.
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla