Beste leden,

Dus mijn script werkt voor de helft.
Dus men kan betalen op 3 manieren paypal,wallie en telefoon.

Paypal en wallie werkt

De telefoon niet en ik ben radeloos.

Wie kan me helpen, dit zijn de 3 scripts die er mee te maken hebben

aankopen.php (onderste is belangrijk)
PHP Code:
<?php
error_reporting
(E_ALL);
    include(
"common.php");
    require_once 
'Mollie/Wallie.php';    
    require(
'Mollie/class.micropayment-mollie.php');
    
$regel;
    
$m = new micropayment();
    
    
$molliePartnerID 184351// Fill in your own Mollie Partner ID! 
    
$m->setPartnerID($molliePartnerID);
    
$wallie = new Mollie_Wallie($molliePartnerID);
    
    
$error "";
    
$my_sFirstName "";
    
$my_sLastName "";
    
$my_clientEmail ="";
    
$my_clientIp ="";
    
$q1 "select * from cart, items where cart.OrderID = '".GetCartId()."' and cart.ItemID = items.ItemID order by items.ItemName";
    
$r1 mysql_query($q1) or die(mysql_error());
    
$col "white";
    
$rows "";
    
$order_total 0;
    
$order 0;
    
$showdiscount ='';
    
$kortingstekst3 ='';
    
$disc2 ='';

    while(
$a1 mysql_fetch_array($r1)){
        
//haalt de korting uit de tabel korting en tabel discount
        
$discount "select discount FROM korting";
        
$disc mysql_query($discount) or die(mysql_error());
        
$disc2 mysql_result($disc,0,'discount');
        
//echo $disc2; //geeft waarde van kolom weer
        
        //Haalt de korting tekst uit de tabel kortin kolom  kortingtekst
        
$kortingstekst "select tekstkorting FROM korting";
        
$kortingstekst1 mysql_query($kortingstekst) or die(mysql_error());
        
$kortingstekst2 mysql_fetch_assoc($kortingstekst1);
        
$kortingstekst3 $kortingstekst2["tekstkorting"];

        if(
$col == "121212"){
            
$col "121212";
        }else{
            
$col "121212";
        }
    
        
$a1['ItemTotal'] = ( $a1['ItemPrice'] * $a1['ItemQty'] );
        
$a1['ItemTotal'] = number_format($a1['ItemTotal'], 2"."",");
        
$rows .= "<tr bgcolor=\"$col\">\n\t<td class=BlackLink>".$a1['ItemName']."</td>\n<td align=right>$aset[currency_sign] $a1[ItemPrice]</td>\t\n\t<td align=center>$a1[ItemQty]</td>\n\t<td align=right>$aset[currency_sign] $a1[ItemTotal]</td>\n</tr>\n\n";

        
$order += $a1['ItemPrice'] * $a1['ItemQty'];
        
$showdiscount = ($order $disc2) / 100;
        
$order_total $order $showdiscount;
    }

    
$order_total number_format($order_total2"."",");
    
$order number_format($order2"."",");
    
$showdiscount number_format($showdiscount2"."",");
    
    if(isset(
$_POST['submit_out'])|| isset($_POST['submit_out_x'])){
        
$my_sFirstName strip_trim($_POST['sFirstName']);
        
$my_sLastName strip_trim($_POST['sLastName']);
        
$my_clientEmail strip_trim($_POST['clientEmail']);
        
$my_clientIp $_SERVER['REMOTE_ADDR'];
        if(empty(
$my_sFirstName)){
            
$error "<span class=RedLink>Gelieve je voornaam in te geven</span>";
        }elseif(empty(
$my_sLastName)){
            
$error "<span class=RedLink>Gelieve je naam in te geven</span>";
        }elseif(empty(
$my_clientEmail) || !ereg("@"$my_clientEmail)){
            
$error "<span class=RedLink>Gelieve je e-mail adres in te geven</span>";
        }
        if(empty(
$error)){
            
$q1 "insert into orders_info set 
                                        FirstName = '
$my_sFirstName',
                                        LastName = '
$my_sLastName',
                                        email = '
$my_clientEmail',
                                        ip = '
$my_clientIp',
                                        order_date = '
$t',
                                        order_total = '
$order_total',
                                        showdiscount = '
$showdiscount'";
            
mysql_query($q1) or die(mysql_error());
            
$order_id mysql_insert_id();
            
$q2 "update cart set OrderID = '$order_id' where OrderID = '".GetCartId()."' ";
            
mysql_query($q2) or die(mysql_error());
            
$check "select * from newsletter where nEmail = '$my_clientEmail'";
            
$result mysql_query($check);
            if(
mysql_num_rows($result) == ) {
                
$q3 "insert into newsletter set 
                                            nEmail = '
$my_clientEmail' ";
                
mysql_query($q3);
            }
            
$payment_option $_POST['payment_option'];
        
            if(
$payment_option == '2') {
                
//redirect to paypal
                
header("location:https://www.paypal.com/xclick?business=$aset[PayPalEmail]&item_name=OrderID $order_id&first_name=$my_sFirstName&last_name=$my_sLastName&email=$my_clientEmail&item_number=1&custom=$order_id&amount=$order_total&currency_code=$aset[currency_id]&notify_url=$site_url/download_link.php&return=$site_url/bedankt.php");
                exit();
            } elseif(
$payment_option == '3') {
            
                  
$prijs        $order_total;
                  
$amount str_replace("."""$prijs);
                  
$siteReportUrl $site_url ."/aankopen.php";
                  
$siteReturnUrl $site_url ."/bedankt.php";

                  
                  if (
$wallie->createPayment($amount$siteReportUrl$siteReturnUrl)) {
                    
// Payment created, You could(/should) save the payment information in your database
                
                    // Get the url of the chosen bank to redirect the user to,
                    // to complete the payment    
                    
header('location: ' $wallie->getWallieUrl());
                  }
                  else {
                    
// show message that the payment could not be created
                    // the function $wallie->getStatus() returns the status
                    // message that Mollie returns
                    
echo $wallie->getStatus();
                  }
                
                if (isset(
$_GET['payment_type']) and $_GET['payment_type'] == 'wallie' and isset($_GET['transaction_id']) and isset($_GET['amount'])) {
                      
// Check if payment is OK.
                      
$checkPayment $wallie->checkPayment($_GET['transaction_id'], $_GET['amount']);
                      
// Mollie makes sure a transaction can only
                      // be used one time!
                      
                      
if ($checkPayment == true) {
                        
// Get the amount of money the user has payed
                        
$paymentAmount $wallie->getAmount();
                        
header('location: ' $site_url/download_link.php);
                        
                        
// Set in your database the paymentstatus to OK.    
                      
}  
                }
                
            }elseif(
$payment_option == '4'){
                
                
                
                
?>
                <form action="bellen_pay.php" method="post" name="myForm">
                      <input type="hidden" name="order_total" value="<? echo $order_total?>" />      
                    <input type="submit" value="Ga door naar betaalpagina" />
                </form>
                <script type='text/javascript'>document.myForm.submit();</script>
                <?
                  
                

                
            
            

        }
    }
    

    require_once(
"templates/hoofdtemplate.php");
    include_once(
"templates/afrekenen.php");
    include_once(
"templates/voetnoot.php");
?>
bellen_pay.php
PHP Code:
<?
  error_reporting
(E_ALL); 
    include(
"common.php");
    require(
'Mollie/class.micropayment-mollie.php');
    require_once(
"templates/hoofdtemplate.php");
?>
<center>
<div align="center" style="background-color: #f2f2f2; border: 1px solid silver; width: 350px; padding: 6px;">
<?

    $m 
= new micropayment();
    
    
$m->setPartnerID(184351); # change this to your partner ID
    
if (isset($_GET['c']) and is_numeric($_GET['c'])) $m->setCountry($_GET['c']);
    
$m->setAmount($_POST['order_total']); # Set payment amount to Ű 0,50
    
    
if (isset($_GET['action']) and $_GET['action'] == 'check' and isset($_SESSION['servicenumber']) and isset($_SESSION['paycode']) and $_SESSION['servicenumber'] and $_SESSION['paycode']) {
        
/* user posted a paymentcheck, so below we'll check if the servicenumber and the paycode is fully payed */
        
        
$m->setServicenumber($_SESSION['servicenumber']);
        
$m->setPaycode($_SESSION['paycode']);
        
$m->checkPayment();
        
        if (
$m->payed) {
            
# User payed succesfully!
            # Now, do your thing: for example put credits on the users account, or give access to premium content
            
            
echo '<b>Bedankt voor je betaling</b><br />
                  De betaling is succesvol gelukt!'
;
                  
                  
?>
              
                  <form action="download_link.php">
                    <input type="hidden" name="payer_email" value="<?=$my_clientEmail?>" />
                    <input type="hidden" name="payment_status" value="Completed" />
                    <input type="hidden" name="custom" value="<?=$order_id?>" />
                    <input type="submit" class="form" value="Rond betaling af" />
                    
                  </form>
                  <?
        
}
        else {
            
# payment is not (fully) done, send the user back to the payment-screen
            
echo '<font color=red><b>Betaling is niet afgerond,<br />volg de onderstaande instructies!</b></font><br /><br />';
        }
    }
    
    if (!
$m->payed) {
        
/* Below we include the payment-screen, because no payment is received (yet) */
        
include('templates/microbetalen.php');
    }

?>
</div>
</center>
<?
include_once("templates/voetnoot.php");
?>
download_link.php
PHP Code:
<?php
    
include("common.php");

    
// Assign posted variables to local variables
    
$receiver_email $_POST['receiver_email'];
    
$payer_email $_POST['payer_email'];
    
$payer_status $_POST['payer_status'];
    
$payment_gross $_POST['payment_gross'];
    
$payment_fee $_POST['payment_fee'];
    
$payment_date $_POST['payment_date'];
    
$payment_type $_POST['payment_type'];
    
$payment_status $_POST['payment_status'];
    
$pending_reason $_POST['pending_reason'];
    
$txn_id $_POST['txn_id'];
    
$txn_type $_POST['txn_type'];
    
    
$custom $_POST['custom'];

    if (
$_REQUEST['payment_status'] == "Completed" || $_REQUEST['payment_status'] == "Pending") {
        
$q1 "update orders_info set order_paid = 'y' where OrderID = '$custom'  ";
        
mysql_query($q1) or die(mysql_error());
        
 
    
$b mktime(date(H),date(i),date(s),date(m),date(d) + $aset[download_days], date(Y));
    
$until date("M/d/Y"$b);
    
$q3 "update orders_info set ExpDate = '$b' where OrderID = '$custom'  ";
    
mysql_query($q3) or die(mysql_error());




        
$q3 "select email from orders_info where OrderID = '$custom'";
        
$r mysql_query($q3) or die(mysql_error());
        if(
$r) { 
            
$e mysql_fetch_row($r);
        }
        
$q3 "select * from orders_info where OrderID = '$custom'";
        
$r mysql_query($q3) or die(mysql_error());
        if(
$r) { 
            
$ee mysql_fetch_assoc($r);
        }

        
$q2 "select ItemID from cart where OrderID = '$custom'";
        
$result mysql_query($q2) or die(mysql_error());
        if(
$result) {
            while(
$row mysql_fetch_row($result)) {
                
$q4 "select ItemName, downloadURL from items where ItemID = '$row[0]'";
                
$rr mysql_query($q4) or die(mysql_error());
                if(
$rr) {
                    
$d mysql_fetch_row($rr);
                    
$dlinks[]= "$site_url/dload.php?k=".$custom."|".$row[0];
                }
            }
            if(
is_array($dlinks)) {
                
$q5 "select ContactEmail from settings";
                
$rr mysql_query($q5) or die(mysql_error());
                
$ce mysql_fetch_row($rr);
                
$headers "From: ".$aset[ContactEmail]."<".$aset[ContactEmail].">\r\nReturn-Path: ".$aset[ContactEmail]."\r\n";
                
$download_links="Hallo $ee[FirstName] $ee[LastName],\r\n\r\n
                Bedankt voor je aankoop\r\n
                Dit is de download URL en deze is actief tot 
$until\r\n\r\n
                "
.implode(", ",$dlinks)."\r\n
                Beste groeten\r\n
                
$site_url";
                
mail($e[0],"Download links van $_SERVER[HTTP_HOST]!",$download_links,$headers);
            }
        }
    }
  
header("Location: /bedankt.php");
  die();

?>