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.