Hey,
Ik was bezig met een wallie betaalmiddel via targetpay.com. Dit is allemaal gelukt etc maar er is één probleem. Als ik naar de wallie betaalmethode gaat dan krijg ik:
Transaction ID: 13036401
URL:
http://www.targetpay.com/wallie/start.php?trxid=13036401
Dus dan zou je de URL moeten kopiëren om naar de betaal scherm te gaan?? Hoe zorg ik voor een redirect in dit script?? :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
<?php
/**
* Ideal example on how to use the ideal class!
*
* SVE
*
* 11-01-2009
*
*/
ini_set ( 'display_errors', '1');
include ( 'TargetPayWallie.class.php');
# Set your rtlo ere
$iRtlo = 57591;
if ( !isset ( $_GET['ShoppingCartID'] ) ) {
# To initiate a payment, initiate the class
$oWallie = new TargetPayWallie ( $iRtlo );
# Set wallie amount in cents so 500 cent will be 5 euro
$oWallie->setWallieAmount ( 150 );
# Set wallie description
$oWallie->setWallieDescription ( 'Buy donator');
# Set return url, wich should return on succes
$oWallie->setWallieReturnUrl ( 'Linkweggehaald' );
/**
* OPTIONAL PARAMETERS FOR WALLIE
* UNCOMMENT IF YOU WANT TO USE
*/
$oWallie->setWallieCountry ( '31' ); // Set the country (optional)
$oWallie->setWallieLang ( 'NL' ); // Set wallie language (optional)
$oWallie->setWallieCurrency ( 'EUR '); // Set wallie currency ( optional )
# Now we can initiate the payment
$aReturn = $oWallie->startPayment();
# This is the transaction id
$intTrxId = $aReturn[0];
# this will be the bank url that will rederect to the bank.
$strURL = $aReturn[1];
# For check we can echo it here. (uncomment if you want to see. )
echo 'Transaction ID: '. $intTrxId . '<br/>URL: '. $strURL;
# Rederect your user now to:
header ( 'Location :'. $strURL );
}
/**
* This function will validate the payment
*
*/
# ?action=vtrxid= 'trxid'
if ( isset ( $_GET['ShoppingCartID'] ) ) {
# Init the class
$oWallie = new TargetPayWallie ( $iRtlo );
# Test mode? 1 = test mode, 0 = normal
$iTest = 0;
# Once, only validate the payment once?
$iOnce = 1;
if ( $oWallie->validatePayment ( $_GET['ShoppingCartID'], $iOnce, $iTest ) == true ) {
mysql_query("UPDATE `speldata` SET `cashmoney`=`cashmoney`+'2500000' WHERE `id`=".ID." LIMIT 1") or die(mysql_error());
mysql_query("UPDATE `status` SET `donateur`=`donateur`+'1' WHERE `id`=".ID." LIMIT 1") or die(mysql_error());
echo 'Your payment was successful';
}
else {
echo 'Payment failed.';
}
}
?>
|
|
|
Alvast bedankt!
Laatst gewijzigd door sukel op 2010-07-19 17:27:28
19-07-2010 17:26
Dit topic is 461 keer bekeken door 58 verschillende leden
Reacties op: "Wallie betaalmiddel"
1 |
2
Reageer op: "Wallie betaalmiddel"
1 |
2