News:

Looking for documentation? Take a look on our wiki

Main Menu

Payment Extra Info

Started by jvels, July 07, 2005, 10:57:52 AM

Previous topic - Next topic

jvels

Hi

I have work on a popup windows solution for the Dankort / PBS to eliminate the SSL problems.

In ps_pbs.php I add som informations to the gateway
// Epay.dk
            case 6:
                form.payment_extrainfo.value = '<'+'?php\n'
                        +'// This is the Session ID\n'
                        +'// It contains the Order ID, the mambo-phpShop Session ID, Mambo\'s SessionCookie and an md5 HASH CheckCode\n'
                        +'$sessionid = sprintf("%08d", $order_id). $_COOKIE[\'phpshop\'].md5($_COOKIE[\'sessioncookie\'].$_SERVER[\'REMOTE_ADDR\']);\n'
                        +'$sessionid .= md5( $sessionid . $mosConfig_secret . ENCODE_KEY);\n'
                        +'$sessionid = base64_encode( $sessionid );\n'
+'require_once(CLASSPATH ."payment/ps_pbs.cfg.php");\n'
+'$url=basename($mosConfig_live_site);\n'
                        +'?>\n'
                        +'<center><a href="https://ssl.ditonlinebetalingssystem.dk/secure/secure.aspx/<? echo"$url"; ?>/popup.php?orderid=<?php echo $order_id ?>&amount=<?php echo round($db->f("order_total")*100?>&currency=<?php echo $currency_iso_4217 ?>&sessionid=<? echo"$sessionid"; ?>&merchantnumber=<?php echo PBS_MERCHANT_ID ?>&PBS_SHOP_ID=<? echo PBS_SHOP_ID ?>&mosConfig_live_site=<? echo $mosConfig_live_site ?>" target="popup" onclick="window.open("","popup", "width=300,height=400,left=0,top=0,resizable=1,toolbar=0,location=0" )"><img src="http://betaling.dk/grafik/forret/kortlogo/dan-s.gif"><br>Betal med Dankort</a></center>'
                break;



But when I login to phpshop and edit the pbs /dankort I only see:
<?php
// This is the Session ID
// It contains the Order ID, the mambo-phpShop Session ID, Mambo's SessionCookie and an md5 HASH CheckCode
$sessionid sprintf("%08d"$order_id). $_COOKIE['phpshop'].md5($_COOKIE['sessioncookie'].$_SERVER['REMOTE_ADDR']);
$sessionid .= md5$sessionid $mosConfig_secret ENCODE_KEY);
$sessionid base64_encode$sessionid );
require_once(
CLASSPATH ."payment/ps_pbs.cfg.php");
$url=basename($mosConfig_live_site);
?>

<center><a href="https://ssl.ditonlinebetalingssystem.dk/secure/secure.aspx//popup.php?orderid=&amount=0&currency=&sessionid=&merchantnumber=88888888&PBS_SHOP_ID=dh7dgw&mosConfig_live_site=http://eshop.vels.dk" target="popup" onclick="window.open("","popup", "width=300,height=400,left=0,top=0,resizable=1,toolbar=0,location=0" )"><img src="http://betaling.dk/grafik/forret/kortlogo/dan-s.gif"><br>Betal med Dankort</a></center>


Why are the <? echo"$url"; ?> <?php echo $order_id ?> values not showen?

If I past <? echo"$url"; ?> in the Payment Extra Info in phpshop then are it working when I try to pay. Some ideas how to get it work?

jvels

I have found the error, i must uses it this way: <'+'?php echo"$url"; ?>