23.07.2013 23:39
|
|
beaverusiv
Name: Nicholas Loomans
15.05.2013
Сообщения: 7
|
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
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Сообщения: 25919
|
Aw: Custom payment method saving order
yes
function checkTransaction($pmconfigs, $order, $act){
....
return array(1, '');
}
Последнее изменение: 24.07.2013 07:57
|
|
24.07.2013 22:11
|
|
beaverusiv
Name: Nicholas Loomans
15.05.2013
Сообщения: 7
|
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
|
|
beaverusiv
Name: Nicholas Loomans
15.05.2013
Сообщения: 7
|
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
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Сообщения: 25919
|
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
|
|
beaverusiv
Name: Nicholas Loomans
15.05.2013
Сообщения: 7
|
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.
Последнее изменение: 25.07.2013 23:19
|
|
29.07.2013 22:57
|
|
beaverusiv
Name: Nicholas Loomans
15.05.2013
Сообщения: 7
|
Aw: Custom payment method saving order
Do you have any idea how I can debug/trace my problem?
|
|
30.07.2013 07:51
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Сообщения: 25919
|
Aw: Custom payment method saving order
See example pm_paypal
|
|
30.07.2013 23:06
|
|
beaverusiv
Name: Nicholas Loomans
15.05.2013
Сообщения: 7
|
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
|
|
valentin17
Name: user
10.12.2011
Сообщения: 8
|
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
Последнее изменение: 10.12.2013 11:14
|
|
04.03.2014 11:10
|
|
pradip
Name: pradip
12.02.2014
Сообщения: 4
|
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
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Сообщения: 25919
|
Aw: Custom payment method saving order
No manual.
See example paypal.
|
|