Ik heb een script waarin ik al een bel functie heb van mollie, maar nu wil ik ook de wallie optie erin maken,
Maar het werkt niet, (zie http://onlinecrimineel.nl/banner/koopbanner2.php)
Als je wallie aanvinkt geeft hij niet weer.
Dit is het gedeelte van mollie uit het script:
PHP Code:
if($_POST["betaalkeuze"]==1){
//mollie code
require('../classes/class.micropayment-mollie.php');
$m = new micropayment();
$m->setPartnerID($page->mollieid);
$m->setCountry($_SESSION["aPostParams"]["land"]);
$m->setAmount($totaal); // Hier kun je de prijs per gesprek instellen
if (isset($_GET['action']) and $_GET['action'] == 'check' and isset($_SESSION['servicenumber']) and isset($_SESSION['paycode']) and $_SESSION['servicenumber'] and $_SESSION['paycode']) {
$m->setServicenumber($_SESSION['servicenumber']);
$m->setPaycode($_SESSION['paycode']);
$m->checkPayment();
if ($m->payed) {
mysql_query("INSERT INTO banner (id,banner_naam,banner_link,banner_image,getoond,geklikt,banner_hoelang,banner_tot,email) VALUES ('','".$_SESSION["aPostParams"]["banner_naam"]."','".$_SESSION["aPostParams"]["code_link"]."','".$_SESSION["aPostParams"]["code_image"]."','0','0','".$_SESSION["aPostParams"]["banner_hoelang"]."','".$_SESSION["aPostParams"]["banner_tot"]."','".$_SESSION["aPostParams"]["email"]."')") or die(mysql_error());
$sStage="betaling_gelukt";
}else{
//payment is not (fully) done, send the user back to the payment-screen
$sStage="betaal";
$sResult="<font color=red><b>Betaling is niet afgerond,<br />volg de bovenstaande instructies!</b></font><br /><br />";
}
}
if (!$m->payed) {
/* Below we include the payment-screen, because no payment is received (yet) */
include('../inc/include.paymentscreen3.php');
}
}
}
}
else{
require_once '../Mollie/Wallie.php';
// Get an instance of the Mollie_Wallie class
// (give your Mollie Partner Id as param to the
// class constructor)
$wallie = new Mollie_Wallie(176521);
if (!isset($_GET['transaction_id']) and !isset($_GET['amount'])) {
// Create the payment, true on succes, false otherwise
// $amount = the total money amount that the user has to pay (in cents!)
// $siteReportUrl = the url where Mollie reports to when the payment is complete.
// Mollie will add payment_type=wallie&transaction_id=<transactionId>&amount=<amount> to this url!
// $siteReturnUrl = the url where Mollie returns to when the payment is complete.
// Mollie will add transaction_id=<transactionId>&amount=<amount> to this url!
$amount ='$totaal';
$siteReportUrl = 'http://www.onlinecrimineel.nl/banner/koopbanner2.php';
$siteReturnUrl = 'http://www.onlinecrimineel.nl/banner/koopbanner2.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
}
}
// (Background) report from Mollie
elseif (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();
// Set in your database the paymentstatus to OK.
}
else {
// Payment failed
}
}
// Return of customer
else {
// Check in your database if the customer has payed using $_GET['transaction_id'] parameter
// and show customer a 'thank you'-page or a 'your order will be processed'-page.
echo 'OK';
}
}
- Script werkt niet goed met wallie optie
-
13-03-2009, 18:18 #1
- Berichten
- 1.907
- Lid sinds
- 16 Jaar
Script werkt niet goed met wallie optie
-
In de schijnwerper
Gezondweekmenu.nl - advertorial plaatsingSEO/LinkbuildingWPC.be - DA28 - DR7 - Uit 1999 - 1k EMD zoekvolume p.mndDomein te koopAllesOverComputers.nl - Zeer geschikt voor een complete content websiteDomein te koopWebsite te koop DR 32 / UR 21 - 1.4K zoektermen - 626 links -184 domeinenWebsite te koop
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic