Epay/Surftown - problemer med "payment extra info"

Alt om nethandel, donationer, betalt medlemskab, abonnenter m.m. i Joomla!

Moderator: b-ronnow

Locked
mikefromdenmark
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Mar 31, 2010 8:17 pm

Epay/Surftown - problemer med "payment extra info"

Post by mikefromdenmark » Wed Apr 07, 2010 2:23 pm

Jeg forsøger at installere Epay betalingsmodul på min Joomla / virtuemart netshop, men jeg får en fejl 403 når jeg prøver at gemme oplysninger til "payment extra info":

Jeg får denne fejl:
Error 403: Forbidden
Your PHP settings have been disabled by an H-Sphere administrator.

Your current PHP configuration:
This configuration was changed: Wed Apr 7 00:05:40 UTC 2010
Please bring your PHP configuration in compliance with admin settings or request your administrator to re-enable support of your settings.


Kan i hjælpe mig? Please, jeg aner ikke hvad problemet er? Jeg har surftown som udbyder, Joomla 1.55 og VM 1.1

PFT

Mikael
Last edited by mikefromdenmark on Thu Apr 08, 2010 2:30 pm, edited 1 time in total.

mikefromdenmark
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Mar 31, 2010 8:17 pm

Re: Epay/Surftown - problemer med "payment extra info"

Post by mikefromdenmark » Thu Apr 08, 2010 2:24 pm

LØST:
Epay sendte denne bagvej ind til Payment Extra Info direkte i databasen:

du skal gøre det i tabellen jos_vm_payment_method.
Du kan tage udgangspunkt i denne SQL:
SELECT j.payment_extrainfo FROM jos_vm_payment_method j where j.payment_class = 'ps_epay';

Surftown rapporterede samtidig at der var en fejl i PHP'en, så om det er det ene eller det andet der har hjulpet ved jeg ikke.

Men Epay's kundeservice har været sublim hele vejen igennem forløbet :D

cooljules1
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Jul 21, 2010 3:30 pm

Re: Epay/Surftown - problemer med "payment extra info"

Post by cooljules1 » Wed Jul 21, 2010 3:33 pm

Hejsa,

EDIT: Nu fandt jeg så ud af det - men kan stadig ikke få indsat merchant nummeret, eftersom jeg slet ikke kan rette i siden uden at den giver mig den omtalte fejl?!

VH
Julius

***

Jeg har præcis samme problem - og ePay er desv. ikke så behjælpelige pt. pga. ferie. :\
Har du mulighed for at være lidt mere specifik mht. løsningen?


tak!

mikefromdenmark
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Mar 31, 2010 8:17 pm

Re: Epay/Surftown - problemer med "payment extra info"

Post by mikefromdenmark » Wed Jul 21, 2010 5:39 pm

Hvis det er dit webhotel der har problemet så er det jo dem du skal have fat i.

Ellers skal du indsætte denne Payment extra info når du bruger ovenstående "bagvej" ind i php'en:

Code: Select all

<?php
function currentURL() {
$pageURL = 'http';
if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .=
$_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
$_SESSION["epay_order_id"] = $order_id;
global $sessionid;
if (((int)EPAY_INTEGRATED_LAYOUT) == 1) {
header("Location: https://relay.ditonlinebetalingssystem.dk/relay/v2/relay.cgi/" .
$mosConfig_live_site . "/index.php?page=checkout.epay_form&sessionid=" . $sessionid
. "&option=com_virtuemart&Itemid=1&forcerelay=1&HTTP_COOKIE=" .
getenv("HTTP_COOKIE") . "&baseurl=" . currentURL());
}
require_once(CLASSPATH ."payment/ps_epay.cfg.php");
$url=basename($mosConfig_live_site);
function get_iso_code($code) {
switch ($code) {
case "ADP": return "020"; break;
case "AED": return "784"; break;
case "AFA": return "004"; break;
case "ALL": return "008"; break;
case "AMD": return "051"; break;
case "ANG": return "532"; break;
case "AOA": return "973"; break;
case "ARS": return "032"; break;
case "AUD": return "036"; break;
case "AWG": return "533"; break;
case "AZM": return "031"; break;
case "BAM": return "977"; break;
case "BBD": return "052"; break;
case "BDT": return "050"; break;
case "BGL": return "100"; break;
case "BGN": return "975"; break;
case "BHD": return "048"; break;
case "BIF": return "108"; break;
case "BMD": return "060"; break;
case "BND": return "096"; break;
case "BOB": return "068"; break;
case "BOV": return "984"; break;
case "BRL": return "986"; break;
case "BSD": return "044"; break;
case "BTN": return "064"; break;
case "BWP": return "072"; break;
case "BYR": return "974"; break;
case "BZD": return "084"; break;
case "CAD": return "124"; break;
case "CDF": return "976"; break;
case "CHF": return "756"; break;
case "CLF": return "990"; break;
case "CLP": return "152"; break;
case "CNY": return "156"; break;
case "COP": return "170"; break;
case "CRC": return "188"; break;
case "CUP": return "192"; break;
case "CVE": return "132"; break;
case "CYP": return "196"; break;
case "CZK": return "203"; break;
case "DJF": return "262"; break;
case "DKK": return "208"; break;
case "DOP": return "214"; break;
case "DZD": return "012"; break;
case "ECS": return "218"; break;
case "ECV": return "983"; break;
case "EEK": return "233"; break;
case "EGP": return "818"; break;
case "ERN": return "232"; break;
case "ETB": return "230"; break;
case "EUR": return "978"; break;
case "FJD": return "242"; break;
case "FKP": return "238"; break;
case "GBP": return "826"; break;
case "GEL": return "981"; break;
case "GHC": return "288"; break;
case "GIP": return "292"; break;
case "GMD": return "270"; break;
case "GNF": return "324"; break;
case "GTQ": return "320"; break;
case "GWP": return "624"; break;
case "GYD": return "328"; break;
case "HKD": return "344"; break;
case "HNL": return "340"; break;
case "HRK": return "191"; break;
case "HTG": return "332"; break;
case "HUF": return "348"; break;
case "IDR": return "360"; break;
case "ILS": return "376"; break;
case "INR": return "356"; break;
case "IQD": return "368"; break;
case "IRR": return "364"; break;
case "ISK": return "352"; break;
case "JMD": return "388"; break;
case "JOD": return "400"; break;
case "JPY": return "392"; break;
case "KES": return "404"; break;
case "KGS": return "417"; break;
case "KHR": return "116"; break;
case "KMF": return "174"; break;
case "KPW": return "408"; break;
case "KRW": return "410"; break;
case "KWD": return "414"; break;
case "KYD": return "136"; break;
case "KZT": return "398"; break;
case "LAK": return "418"; break;
case "LBP": return "422"; break;
case "LKR": return "144"; break;
case "LRD": return "430"; break;
case "LSL": return "426"; break;
case "LTL": return "440"; break;
case "LVL": return "428"; break;
case "LYD": return "434"; break;
case "MAD": return "504"; break;
case "MDL": return "498"; break;
case "MGF": return "450"; break;
case "MKD": return "807"; break;
case "MMK": return "104"; break;
case "MNT": return "496"; break;
case "MOP": return "446"; break;
case "MRO": return "478"; break;
case "MTL": return "470"; break;
case "MUR": return "480"; break;
case "MVR": return "462"; break;
case "MWK": return "454"; break;
case "MXN": return "484"; break;
case "MXV": return "979"; break;
case "MYR": return "458"; break;
case "MZM": return "508"; break;
case "NAD": return "516"; break;
case "NGN": return "566"; break;
case "NIO": return "558"; break;
case "NOK": return "578"; break;
case "NPR": return "524"; break;
case "NZD": return "554"; break;
case "OMR": return "512"; break;
case "PAB": return "590"; break;
case "PEN": return "604"; break;
case "PGK": return "598"; break;
case "PHP": return "608"; break;
case "PKR": return "586"; break;
case "PLN": return "985"; break;
case "PYG": return "600"; break;
case "QAR": return "634"; break;
case "ROL": return "642"; break;
case "RUB": return "643"; break;
case "RUR": return "810"; break;
case "RWF": return "646"; break;
case "SAR": return "682"; break;
case "SBD": return "090"; break;
case "SCR": return "690"; break;
case "SDD": return "736"; break;
case "SEK": return "752"; break;
case "SGD": return "702"; break;
case "SHP": return "654"; break;
case "SIT": return "705"; break;
case "SKK": return "703"; break;
case "SLL": return "694"; break;
case "SOS": return "706"; break;
case "SRG": return "740"; break;
case "STD": return "678"; break;
case "SVC": return "222"; break;
case "SYP": return "760"; break;
case "SZL": return "748"; break;
case "THB": return "764"; break;
case "TJS": return "972"; break;
case "TMM": return "795"; break;
case "TND": return "788"; break;
case "TOP": return "776"; break;
case "TPE": return "626"; break;
case "TRL": return "792"; break;
case "TRY": return "949"; break;
case "TTD": return "780"; break;
case "TWD": return "901"; break;
case "TZS": return "834"; break;
case "UAH": return "980"; break;
case "UGX": return "800"; break;
case "USD": return "840"; break;
case "UYU": return "858"; break;
case "UZS": return "860"; break;
case "VEB": return "862"; break;
case "VND": return "704"; break;
case "VUV": return "548"; break;
case "XAF": return "950"; break;
case "XCD": return "951"; break;
case "XOF": return "952"; break;
case "XPF": return "953"; break;
case "YER": return "886"; break;
case "YUM": return "891"; break;
case "ZAR": return "710"; break;
case "ZMK": return "894"; break;
case "ZWD": return "716"; break;
}
return "XXX"; // return invalid code if the currency is not found 
}

function calculateePayCurrency($order_id)
{
$db =& new ps_DB;
$currency_code = "208";
$q = "SELECT order_currency FROM #__vm_orders where order_id = " . $order_id;
$db->query($q);
if ($db->next_record()) {
        $currency_code = get_iso_code($db->f("order_currency"));
}
return $currency_code;
}
 echo $VM_LANG->_('VM_CHECKOUT_EPAY_PAYMENT_CHECKOUT_HEADER');
?>
<script type="text/javascript" src="http://www.epay.dk/js/standardwindow.js"></script>
<form action="https://ssl.ditonlinebetalingssystem.dk/popup/default.asp"
method="post" name="ePay" target="ePay_window" id="ePay">
<input type="hidden" name="merchantnumber" value="<?php echo EPAY_MERCHANTNUMBER ?>">
<input type="hidden" name="amount" value="<?php echo
round($db->f("order_total")*100, 2 ) ?>">
<input type="hidden" name="currency" value="<?php echo
calculateePayCurrency($order_id)?>">
<input type="hidden" name="orderid" value="<?php echo $order_id ?>">
<input type="hidden" name="instantcallback" value="1">
<?php 
echo '<input type="hidden" name="callbackurl" value="' . $mosConfig_live_site .
'/index.php?page=checkout.epay_result&accept=2&sessionid=' . $sessionid .
'&option=com_virtuemart&Itemid=1">';
?>
<input type="hidden" name="accepturl" value="<?php echo $mosConfig_live_site
?>/index.php?page=checkout.epay_result&accept=1&sessionid=<?php echo $sessionid
?>&option=com_virtuemart&Itemid=1">
<input type="hidden" name="declineurl" value="<?php echo $mosConfig_live_site
?>/index.php?page=checkout.epay_result&accept=0&sessionid=<?php echo $sessionid
?>&option=com_virtuemart&Itemid=1">
<input type="hidden" name="group" value="<?php echo EPAY_GROUP ?>">
<input type="hidden" name="instantcapture" value="<?php echo EPAY_INSTANT_CAPTURE ?>">
<?php
if (strcmp($mosConfig_lang, "danish") == 0 || strcmp($mosConfig_lang, "dansk") == 0)
echo '<input type="hidden" name="language" value="1">';
else if (strcmp($mosConfig_lang, "swedish") == 0 || strcmp($mosConfig_lang,
"svenska") == 0)  echo '<input type="hidden" name="language" value="2">';
else if (strcmp($mosConfig_lang, "norwegian") == 0 || strcmp($mosConfig_lang,
"norsk") == 0)  echo '<input type="hidden" name="language" value="3">';
else if (strcmp($mosConfig_lang, "greenland") == 0 || strcmp($mosConfig_lang,
"norsk") == 0)  echo '<input type="hidden" name="language" value="4">';
else if (strcmp($mosConfig_lang, "greenland") == 0 || strcmp($mosConfig_lang,
"kalaallisut") == 0)  echo '<input type="hidden" name="language" value="5">';
else if (strcmp($mosConfig_lang, "icelandic") == 0 || strcmp($mosConfig_lang,
"�slenska") == 0)  echo '<input type="hidden" name="language" value="6">';
else if (strcmp($mosConfig_lang, "german") == 0 || strcmp($mosConfig_lang,
"deutsch") == 0)  echo '<input type="hidden" name="language" value="7">';
else  echo '<input type="hidden" name="language" value="2">';;
?>
<?php echo "[" . $mosConfig_lang . "]" ?>
<input type="hidden" name="authsms" value="<?php echo EPAY_AUTH_SMS ?>">
<input type="hidden" name="authmail" value="<?php echo EPAY_AUTH_MAIL .
(strlen(EPAY_AUTH_MAIL) > 0 && EPAY_AUTHEMAILCUSTOMER == 1 ? ";" : "") .
(EPAY_AUTHEMAILCUSTOMER == 1 ? $user->user_email : ""); ?>">
<input type="hidden" name="windowstate" value="<?php echo EPAY_WINDOW_STATE ?>">
<input type="hidden" name="use3D" value="<?php echo EPAY_3DSECURE ?>">
<input type="hidden" name="addfee" value="<?php echo EPAY_ADDFEE ?>">
<input type="hidden" name="MD5Key" value="<?php if (EPAY_MD5_TYPE == 2) echo md5(
calculateePayCurrency($order_id) . round($db->f("order_total")*100, 2 ) . $order_id 
. EPAY_MD5_KEY)?>">
</form>
<script>open_ePay_window();</script>
<br>
<table border="0" width="100%"><tr><td><input type="button"
onClick="open_ePay_window()" value="<?php echo
$VM_LANG->_('VM_CHECKOUT_EPAY_BUTTON_OPEN_WINDOW') ?>"></td><td width="100%"
id="flashLoader"></td></tr></table><br><br><br>
<?php echo $VM_LANG->_('VM_CHECKOUT_EPAY_PAYMENT_CHECKOUT_FOOTER') ?>
<br><br>
<img src="components/com_virtuemart/shop_image/ps_image/epay_images/epay_logo.gif"
border="0">&nbsp;&nbsp;&nbsp;
<img
src="components/com_virtuemart/shop_image/ps_image/epay_images/mastercard_securecode.gif"
border="0">&nbsp;&nbsp;&nbsp;
<img src="components/com_virtuemart/shop_image/ps_image/epay_images/pci.gif"
border="0">&nbsp;&nbsp;&nbsp;
<img
src="components/com_virtuemart/shop_image/ps_image/epay_images/verisign_secure.gif"
border="0">&nbsp;&nbsp;&nbsp;
<img src="components/com_virtuemart/shop_image/ps_image/epay_images/visa_secure.gif"
border="0">&nbsp;&nbsp;&nbsp;

mikefromdenmark
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Mar 31, 2010 8:17 pm

Re: Epay/Surftown - problemer med "payment extra info"

Post by mikefromdenmark » Wed Jul 21, 2010 5:40 pm

Prøv evt. den payment extra info jeg har sendt, ellers har jeg ikk' rigtig nogen idéer...

Håber det lykkes for dig.

cooljules1
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Jul 21, 2010 3:30 pm

Re: Epay/Surftown - problemer med "payment extra info"

Post by cooljules1 » Wed Jul 21, 2010 6:39 pm

Tak for svaret mike! Jeg prøver - men hvordan fik du indtastet merchant nummer? Det står vel ikke i den 'extra info' text der?

vh
Julius

mikefromdenmark
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Mar 31, 2010 8:17 pm

Re: Epay/Surftown - problemer med "payment extra info"

Post by mikefromdenmark » Thu Jul 22, 2010 5:44 am

Jeg havde ikke problemet med at indtaste nummeret, så der er jeg desværre lidt blank...

Håber det lykkes for dig :-)


Locked

Return to “Nethandel, betaling m.m.”