Witam wszystkich mam pytanie czy ktoś posiada wiedzę jak przystosowac system płatnosci.pl do Virtuemart? znalazłem w sieci taki oto sposób ale nie bardzo wiem jak to ugryźć bo mój angielski nie jest zbyt mocny dlatego proszę Was o pomoc.
mkycler Newbie
Posts: 9
Platnosci.pl payment module « on: October 13, 2005, 00:06:55 am »
Hi, everybody.
I,ve just finished intergration of mambo-phpshop with Platnosci.pl (polish online payment service). Here come short tips how to use it:
copy two ps_ files to your administrator/components/com_phpshop/classes/payment directory. Copy platnosci_notify.php to your administrator/components/com_phpshop directory. Copy checkout.PPL_result.php to your administrator/components/com_phpshop/html directory.
Create a new payment method with "PayPal (or related)" type and "ps_platnosci" as payment class name. Fill configuration options with values provided by Platnosci.pl for your POS.
Insert the following code as Payment Extra Info (sorry for Polish language, but it's a polish service anyway ):
Code:
<script language="JavaScript" type="text/JavaScript" src="https://www.platnosci.pl/paygw/ISO/js/<?php echo PLATNOSCI_POS_ID ?>/<?php echo substr(PLATNOSCI_KEY1,0,2) ?>/paytype.js"></script>
<strong>Wybierz typ płatności i kliknij na obrazek "Obsługa transakcji", aby zapłacić za złożone zamówienie.</strong>
<form action="https://www.platnosci.pl/paygw/ISO/NewPayment" method="POST"
name="payform">
<script language="JavaScript" type="text/JavaScript">
PlnDrawRadioImg(4);
</script>
<div align="center"><input type="image" name="submit" src="/images/stories/zaplac.gif" border="0" alt="Zapłać poprzez Platnosci.pl"></div>
<input type="hidden" name="pos_id" value="<?php echo PLATNOSCI_POS_ID ?>">
<input type="hidden" name="session_id" value="<?php $db->p("order_number") ?>">
<input type="hidden" name="order_id" value="<?php $db->p("order_id") ?>">
<input type="hidden" name="amount" value="<?php printf("%d", $db->f("order_total")*100)?>">
<input type="hidden" name="desc" value="YourShopName Zamówienie <?php echo $order_id ?>">
<input type="hidden" name="first_name" value="<?php echo $auth["first_name"] ?>">
<input type="hidden" name="last_name" value="<?php echo $auth["last_name"] ?>">
<?php
$qv = "SELECT email FROM #__users ";
$qv .= "WHERE id=".$auth["user_id"];
$dbbt = new ps_DB;
$dbbt->query($qv);
$dbbt->next_record();
$user_email = $dbbt->f("email");
?>
<input type="hidden" name="email" value="<?php echo $user_email ?>">
<input type="hidden" name="client_ip" value="<?php echo $_SERVER['REMOTE_ADDR'] ?>">
<input type="hidden" name="js" value="0">
</form>
<script language="JavaScript" type="text/javascript">
<!--
document.forms[’payform’].js.value=1;
-->
</script>
When configuring your POS with Platnosci.pl mind the following parameters:
Adres powrotu błędnego (Return address when fail): http://www.yourURL.pl/index.php?option=com_phpshop&page=checkout.PPL_res ult&order_id=%orderId%&error_code=%error%
Adres powrotu pozytywnego (Return address when succeed): http://www.yourURL.pl/index.php?option=com_phpshop&page=checkout.PPL_res ult&order_id=%orderId%
Adres raportów (Reporting address): http://www.yourURL.pl/administrator/components/com_phpshop/platnosci_notify.php
Thats it. I've tested it with Platnosci.pl "test payment service" and it works good.
Jest tam równiez mowa o jakimś błędzie który umożliwia zmianę ceny produktu o ile dobrze zrozumiałem, więc będę wdzieczny za wszelkie informacje
link do wątku
http://mambo-phpshop.net/index.php?o...&topic=12480.0
pozdrawiam