Drupal: Paypal popravki

This commit is contained in:
Robert 2020-10-29 06:39:30 +01:00
parent fdae332a36
commit ae494c9ab2
2 changed files with 35 additions and 3 deletions

View File

@ -7,6 +7,15 @@ function nakupovanje_1ka_menu()
{
$items = [];
$items['nakupovanje-api'] = [
'title' => 'API', //page title
'page callback' => 'nakupovanje_1ka_api', //callback function which is invoked when menu item is called.
'access callback' => MENU_CALLBACK, //any user can access this page
'page arguments' => [
1,
],
];
$items['izvedi-nakup/%/podatki'] = [
'title' => 'Nakup izbranega paketa', //page title
'description' => 'Nakupovalna košarica',
@ -99,6 +108,24 @@ function nakupovanje_1ka_menu()
];
// ENG povezave
$items['purchase/paypal'] = [
'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
'page arguments' => [
1,
],
];
$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
'page arguments' => [
1,
],
];
$items['purchase/%/package'] = [
'title' => 'Purchase of the selected package', //page title
'page callback' => 'nakupovanje_1ka_kosarica', //callback function which is invoked when menu item is called.
@ -167,6 +194,11 @@ function nakupovanje_1ka_menu()
return $items;
}
function nakupovanje_1ka_api()
{
return 'success';
}
function nakupovanje_1ka_kosarica()
{
return theme('nakupovanje_1ka_kosarica');

View File

@ -5,9 +5,9 @@
<div style="padding: 2rem 0;">
<p>
<?php if ($language->language == 'sl'): ?>
Vaše naročilo je preklicano.
Vaše naročilo je preklicano. Če želite ponovno oddati naročilo (spremeniti način plačila ali izbrati drug paket), kliknite na <a href="/d/sl/cenik/zasebni-paketi">povezavo</a>.
<?php else: ?>
Your order has been canceled.
Your order has been canceled. Click the <a href="/d/en/price-list/private-packages">link</a> to resubmit your order (change your payment method or choose another package).
<?php endif; ?>
</p>
</div>
@ -15,7 +15,7 @@
<div class="w-clearfix bottom-buttons">
<div class="col" style="float: left;">
<?php if ($language->language == 'sl'): ?>
<a href="/" class="w-link-button">Vrni se na naslovno stran</a>
<a href="/d/sl" class="w-link-button">Vrni se na naslovno stran</a>
<?php else: ?>
<a href="/d/en" class="w-link-button">Return to home page</a>
<?php endif; ?>