bizplan Posted September 26, 2013 Share Posted September 26, 2013 HI I want to create new payment module for 1 payment gateway from (Malaysia), I manage to connect to payment gateway but when i comfirm payment and want to return back to my store, its return error Cart cannot be loaded or an order has already been placed using this cart Can anyone help me? Here is validation.php $webcash = new webcash(); $webcash_name = 'webcash Online Payment Gateway '; $cart = new Cart(intval($_POST['ord_mercID'])); /*$amount_cart = number_format($cart->getOrderTotal(), 2, '.', ''); if (round($amount_cart)== $_POST['Amount']) { $amt_cart = $amount_cart; } */ $r_amount = str_replace(",","",$_POST['Amount']); //remove thousand symbol $amount_cart = $r_amount; $amount = $_POST['amount']; $RefNo = $_POST['ord_mercID']; $tranID = $_POST['TransId']; $status = $_POST['Status']; function Requery() { $MerchantCode = $_REQUEST['MerchantCode']; $RefNo = $_REQUEST['ord_mercref']; $Amount = $_REQUEST['Amount']; $query = "http://staging.webcash.com.my/enquiry.php?ord_mercID=" . $MerchantCode . "&ord_mercref=" . $RefNo . "&ord_totalamt=" . $Amount; $url = parse_url($query); $host = $url["host"]; $path = $url["path"] . "?" . $url["query"]; $timeout = 15; $fp = fsockopen ($host, 80, $errno, $errstr, $timeout); if ($fp) { fputs ($fp, "GET $path HTTP/1.0\nHost: " . $host . "\n\n"); while (!feof($fp)) { $buf .= fgets($fp, 128); } $lines = split("\n", $buf); $Result = $lines[count($lines)-1]; fclose($fp); } else { # enter error handing code here } return $Result; } if ($status == "100" && Requery()=="S") { // successful transaction $webcash->validateOrder(intval($orderid), _PS_OS_PAYMENT_, $amount_cart, $webcash_name,$webcash->getL('S').''.$tranID.')'); Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?id_cart='.$cart->id.'&id_module='.$webcash->id); } else { // failure transaction $webcash->validateOrder(intval($orderid),_PS_OS_ERROR_,$amount_cart, $webcash_name, $webcash->getL('-1').''.$tranID.')'); Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?id_cart='.$cart->id.'&id_module='.$webcash->id); } ?> Link to comment Share on other sites More sharing options...
bellini13 Posted September 26, 2013 Share Posted September 26, 2013 These should be your first lines in validation.php include(dirname(__FILE__). '/../../config/config.inc.php'); include(dirname(__FILE__). '/../../init.php'); You should confirm what value you are being sent in ord_mercID $cart = new Cart(intval($_POST['ord_mercID'])); Then you should validate that you can load the Cart if (!Validate::isLoadedObject($cart)) { Logger::addLog('Cart loading failed for cart '.(int)$_POST['ord_mercID'], 4); die('An unrecoverable error occured with the cart '.(int)$_POST['ord_mercID']); } Link to comment Share on other sites More sharing options...
bizplan Posted September 27, 2013 Author Share Posted September 27, 2013 I got full set of module payment file.. can anyone check for me? Link to comment Share on other sites More sharing options...
Farid Zenon Posted December 12, 2013 Share Posted December 12, 2013 @bizplan, masalah utama bila return page tak ke halaman pengesahan pembayaran bukan? Link to comment Share on other sites More sharing options...
bizplan Posted December 12, 2013 Author Share Posted December 12, 2013 ha ah.. tu la masalahnya.. ada solution tak? Link to comment Share on other sites More sharing options...
Farid Zenon Posted December 13, 2013 Share Posted December 13, 2013 (edited) Sebenarnya abaikan lah, webcash ni ada masalah pengurusan dan kepakaran, jika ada SME yang menggunakan pelantar pembayaran mereka kelak bakal mengundang masalah. Pelangan sasaran mereka adalah user dan peniaga besar. Peniaga kecil ni dinasihatkan jangan lah, tidak mesra komuniti.. Aku faham kenapa ianya menjadi faktor utama? kerana getway ni tak mengenakan sebarang charge untuk setup bukan? biasa lah tu. Last plugin dikemaskini pada tahun 2009? agak-agak la kawan, kau tu payment gateway. Edited December 13, 2013 by Farid Zenon (see edit history) Link to comment Share on other sites More sharing options...
Farid Zenon Posted December 13, 2013 Share Posted December 13, 2013 (edited) Webcash v1.0 (Mar 2009) module for Prestashop v1.0 released on 2008 here the source code. i don't think this payment gateway module gonna be your first choice since this module last update on 2009 & actually the module not by webcash it self, but from merchant who provide this module back to community long time ago. Unless just fork from this module recreate working module for latest version Prestashop. Edited December 15, 2013 by Farid Zenon (see edit history) Link to comment Share on other sites More sharing options...
CLance Posted February 18, 2014 Share Posted February 18, 2014 Webcash v1.0 (Mar 2009) module for Prestashop v1.0 released on 2008 here the source code. i don't think this payment gateway module gonna be your first choice since this module last update on 2009 & actually the module not by webcash it self, but from merchant who provide this module back to community long time ago. Unless just fork from this module recreate working module for latest version Prestashop. Farid, saya perlukan module ini juga. Farid, you tahu menggunakan Prestashop, selain PAYPAL, apa payment gateway yang sesuai digunakan dalam Malaysia? Link to comment Share on other sites More sharing options...
CLance Posted February 18, 2014 Share Posted February 18, 2014 I got full set of module payment file.. can anyone check for me? @bizplan, can you share the full set of the module? Link to comment Share on other sites More sharing options...
bizplan Posted February 18, 2014 Author Share Posted February 18, 2014 Farid, saya perlukan module ini juga. Farid, you tahu menggunakan Prestashop, selain PAYPAL, apa payment gateway yang sesuai digunakan dalam Malaysia? Selain daripada PAYPAL.. boleh guna paid services macam ipay88, nbpay @molpay... @bizplan, can you share the full set of the module? Can't use at all Link to comment Share on other sites More sharing options...
CLance Posted February 18, 2014 Share Posted February 18, 2014 Selain daripada PAYPAL.. boleh guna paid services macam ipay88, nbpay @molpay... Can't use at all Bizplan, 1. Adakah module sedia ada untuk ipay88, nbpay, dan molpay untuk Prestashop? 2. Yang module itu, can't use at all, but you berjaya sampai ke page untuk bayar, tapi masalahnya di return page sahaja, kan? Link to comment Share on other sites More sharing options...
CLance Posted February 18, 2014 Share Posted February 18, 2014 (edited) I found this one,1. http://modulehub.com/webcash-malaysian-payment-integration 2. http://www.bellini-services.com/shop/home/44-webcash-payment-module.html but not sure it is usable. Edited February 18, 2014 by Lance Chan (see edit history) Link to comment Share on other sites More sharing options...
bizplan Posted February 18, 2014 Author Share Posted February 18, 2014 Bizplan, 1. Adakah module sedia ada untuk ipay88, nbpay, dan molpay untuk Prestashop? ha ah... nbpay dgn molpay tu sama je.. ipay88 dan molpay mmg ada module utk prestashop, cuma dua2 ada registrtation fee. WEBCASH x de.. 2. Yang module itu, can't use at all, but you berjaya sampai ke page untuk bayar, tapi masalahnya di return page sahaja, kan? Ye, return blank.. Link to comment Share on other sites More sharing options...
bizplan Posted February 18, 2014 Author Share Posted February 18, 2014 i got quotation from other developer but dont have money to pay them.. cost about USD70 Link to comment Share on other sites More sharing options...
ruslyrossi Posted September 14, 2015 Share Posted September 14, 2015 (edited) sorry off-topic, but If someone looking for iPay88 module you can download here https://github.com/ruslyrossi47/iPay88-Prestashop Edited September 14, 2015 by ruslyrossi (see edit history) Link to comment Share on other sites More sharing options...
taydotech123 Posted September 18, 2015 Share Posted September 18, 2015 Did you solved this issue? I can send a sample for payment module which i coded Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now