Autor Zpráva
Venna
Profil *
Potřebuji pomoc s napojením premium sms na platební modul(mám k dispozici pouze modul pro platbu šekem). Jsem programátorský zelenáč a nevím si rady, jak napojit příchozí data na modul. Za pomoc samozřejmě rád zaplatím. Kontaktujte mě prosím na tel: 724 192 410 nebo emailu kohoutv@email.cz
Předem děkuji za ochotu.

Zpráva o platbě příjde ve formátu:
"http://www.mujweb.cz/platba/sms.php?price=30.00&hash=emulator&operator=tmo&text=43
Kde 30,00 je výše platby a 43 je id inzerátu Samozřejmě pokaždé jiné hodnoty).
Platební modul (pro platbu šekem) je ve tvaru:
<?php 
/**
 * Create Form
 * This function is responsible for creating the form to send
 * to the gateway.
 * 
 * The name check_ comes from the gateway's config file. It is 
 * $gateway['name']='check';
 * 
 * Available $params are:
 * $params['oID'] - Order ID
 * $params['extra'] - The extra info
 * $params['extra2'] - The second extra info
 * $params['oProduct'] - The product name ordered
 * $params['oTotal'] - The total price
 * 
 */
function check_createForm($params)
{
    $output ='<form name="final" id="final" action="thanks.php?gateway=check" method="post">';
    $output.='<input type="hidden" name="mode" value="complete" />';
    $output.='<input type="hidden" name="oID" value="'.$params['oID'].'" />';
    $output.='<input type="hidden" name="oTotal" value="'.$params['oTotal'].'" />';
    $output.='<input type="hidden" name="act" value="check" />';
    return $output;
}

/**
 * Process The Transaction
 * This function handles the post back data and
 * calls the update order function. The update function
 * then sets the expiration date for the listing and marks it active.
 * 
 * @array $params - The post back data.  
 * $params['gatewayid'] - The id of the gateway
 * $params['approved'] Y or N depending on if it is approved.
 */
function check_processTransaction($params)
{
    global $db,$Orders,$userid,$Core;
    $Orders->logTransaction($params['gatewayid'], $params['oID'], 'Completed', $userid, 'Check or Money Order', $params['oTotal']);
    if(number_format($params['oTotal']) > '0')
    {
        $Orders->changeDisplay('2', $params['oID']);
        if($Orders->updateOrder($params['oID'], 'N'))
        {
            return TRUE;
        }
    }
    else
    {
        $settings=$Core->getCheckoutSettings();
        if($settings['checkoutManuallyApprove']=="Y")
        {
            $Orders->changeDisplay('2', $params['oID']);
        }
        else
        {
            $Orders->changeDisplay('1', $params['oID']);
        }
        if($Orders->updateOrder($params['oID'], 'Y'))
        {
            return TRUE;
        }
        else
        {
            //an error occured
            return "We are sorry but an error occured. Please contact support.";
        }
    }
}
?>

Moderátor Joker: Vkládej prosím kódy mezi značky [pre] a [/pre] (stačí kliknout na ).

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0