Custom payment method saving order

23.07.2013 23:39
#1
beaverusiv
Joomshopping forum user no avatar
Name: Nicholas Loomans
15.05.2013
Posts: 7
Quote
Custom payment method saving order

I am trying to build my own payment method based on the PayPal one, but am having trouble getting the order to save; I am assuming this happens in the checkTransaction() function?

What part of this in pm_paypal is responsible for saving an order?

I tried:
return array(1, '');
but it didn't work.

 
24.07.2013 07:55
#2
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16514
Quote
Aw: Custom payment method saving order

yes

function checkTransaction($pmconfigs, $order, $act){
....
return array(1, '');
}


Letzte Änderung: 24.07.2013 07:57
 
24.07.2013 22:11
#3
beaverusiv
Joomshopping forum user no avatar
Name: Nicholas Loomans
15.05.2013
Posts: 7
Quote
Aw: Custom payment method saving order

I've tried die() and sending an email from this function, it never gets called.

 
25.07.2013 01:27
#4
beaverusiv
Joomshopping forum user no avatar
Name: Nicholas Loomans
15.05.2013
Posts: 7
Quote
Aw: Custom payment method saving order

To help you see what I'm doing;

pm_paymentexpress.php:
http://pastebin.com/sJgXUykJ

shop_success.php:
http://pastebin.com/bsjJ0anS

 
25.07.2013 08:16
#5
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16514
Quote
Aw: Custom payment method saving order

Try change

<UrlSuccess>index.php?option=com_jshopping&controller=checkout&task=step7&act=return&js_paymentclass=pm_paymentexpress</UrlSuccess>


function getUrlParams($pmconfigs){
$params = array();
$params['order_id'] = 10;
$params['hash'] = "";
$params['checkHash'] = 0;
$params['checkReturnParams'] = 1;
return $params;
}

 
25.07.2013 22:26
#6
beaverusiv
Joomshopping forum user no avatar
Name: Nicholas Loomans
15.05.2013
Posts: 7
Quote
Aw: Custom payment method saving order

As I stated in the comments on the file the URL cannot have parameters (any non alphanumeric characters like '&' or '?'). I get an invalid request error from them when changing it to that.

Changing 'checkReturnParams' to 1 gave me the error: Payment method error.

So I added '&order_id=[order_id]' onto my redirect and then in getUrlParams I made it $params['order_id'] = $_GET['order_id']; now it doesn't give an error, but it doesn't log the order or send an email.


Letzte Änderung: 25.07.2013 23:19
 
29.07.2013 22:57
#7
beaverusiv
Joomshopping forum user no avatar
Name: Nicholas Loomans
15.05.2013
Posts: 7
Quote
Aw: Custom payment method saving order

Do you have any idea how I can debug/trace my problem?

 
30.07.2013 07:51
#8
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16514
Quote
Aw: Custom payment method saving order

See example pm_paypal

 
30.07.2013 23:06
#9
beaverusiv
Joomshopping forum user no avatar
Name: Nicholas Loomans
15.05.2013
Posts: 7
Quote
Aw: Custom payment method saving order

You say that and I have seen it and as far as I can tell I am doing the exact same thing. pm_paypal is not documented well enough to glean anymore from it.

 
10.12.2013 11:12
#10
valentin17
Joomshopping forum user no avatar
Name: user
10.12.2011
Posts: 8
Quote
Aw: Custom payment method saving order

Hello! I also have question about order_id.
My answer from payment system have order_number.

function getUrlParams($pmconfigs){
$params = array();
$payment = JRequest::getString("payment"); //receive answer
parse_str($payment); //parse string and receive severals variables with values, now I receive variable $order with order number
$order_number = $order;
$params['order_id'] = ................;
$params['hash'] = "";
$params['checkHash'] = 0;
$params['checkReturnParams'] = 1;
return $params;
}

How I can determine order_id by it order_number?

Best regards.


Joomla: 2.5.16
JoomShopping: 3.16.0
PHP: 5.4

Letzte Änderung: 10.12.2013 11:14
 
04.03.2014 11:10
#11
pradip
Joomshopping forum user no avatar
Name: pradip
12.02.2014
Posts: 4
Quote
Aw: Custom payment method saving order

Is there any manual for making custom payment method.
At least how many functions are required and what is the role of each functions.
Also which type of parameters we have to pass etc...

Thanks
Pradip


Joomla: 3.2.2
JoomShopping: 4.4.1
PHP: 5.3.8
MySQL: 5.6.12
Website Url: localhost
 
04.03.2014 20:40
#12
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16514
Quote
Aw: Custom payment method saving order

No manual.
See example paypal.

 
Copyrights MAXXmarketing GmbH. All Rights Reserved