Drupal: Paypal popravki
This commit is contained in:
parent
ae494c9ab2
commit
df3d8970a6
@ -108,7 +108,7 @@ function nakupovanje_1ka_menu()
|
||||
];
|
||||
|
||||
// ENG povezave
|
||||
$items['purchase/paypal'] = [
|
||||
$items['purchase-paypal/success'] = [
|
||||
'title' => 'Uspešno plačilo preko PayPala', //page title
|
||||
'page callback' => 'nakupovanje_1ka_paypal_return', //callback function which is invoked when menu item is called.
|
||||
'access callback' => true, //any user can access this page
|
||||
@ -117,7 +117,7 @@ function nakupovanje_1ka_menu()
|
||||
],
|
||||
];
|
||||
|
||||
$items['purchase/paypal-cancel'] = [
|
||||
$items['purchase-paypal/cancel'] = [
|
||||
'title' => 'Payment canceled via PayPal', //page title
|
||||
'page callback' => 'nakupovanje_1ka_paypal_cancel', //callback function which is invoked when menu item is called.
|
||||
'access callback' => true, //any user can access this page
|
||||
|
@ -789,7 +789,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (window.location.pathname.indexOf('/narocilo/paypal-cancel') > -1 && location.search.split('narocilo_id=').length > 1) {
|
||||
if (
|
||||
(window.location.pathname.indexOf('/narocilo/paypal-cancel') > -1 && location.search.split('narocilo_id=').length > 1) ||
|
||||
(window.location.pathname.indexOf('/purchase-paypal/cancel') > -1 && location.search.split('narocilo_id=').length > 1)
|
||||
) {
|
||||
var parametri = window.location.search.substr(1);
|
||||
|
||||
jQuery.post('/frontend/payments/api.php?action=cancel_narocilo_paypal', parametri).done(function (val) {
|
||||
@ -802,7 +805,10 @@
|
||||
});
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf('/narocilo/paypal?narocilo_id') > -1 && location.search.split('narocilo_id=').length > 1) {
|
||||
if (
|
||||
(window.location.href.indexOf('/narocilo/paypal?narocilo_id') > -1 && location.search.split('narocilo_id=').length > 1) ||
|
||||
(window.location.href.indexOf('/purchase-paypal/success?narocilo_id') > -1 && location.search.split('narocilo_id=').length > 1)
|
||||
){
|
||||
var parametri = window.location.search.substr(1);
|
||||
|
||||
jQuery.post('/frontend/payments/api.php?action=capture_narocilo_paypal', parametri).done(function (val) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user