New payment plugin for BBVA (Spanish Bank)

  • Posts: 5
  • Thank you received: 0
12 years 10 months ago #34537

Hi all,
Im trying to make this plugin to work fine from start to end on Joomla 1.6 and latest version of HikaShop.

I have it accepting payments fine, but the problem comes with the PAYMENT NOTIFICATION.

This bank doesn't accept a notification URL so long... and i'm trying to change my notification URL.

Can you take a look to this code... my intention is to change the notification URL no another .php for example:

The bank gateway returns the parameters via $_GET inside and XML.

mywebsite.com/notification.php

is it posible?! Call the onPaymentNotification... from other file.
I only need be able to update de status from de order and send the confirmation email...
Thanks!!

<?php
include('plugins/hikashoppayment/bbva.php');

echo "starting notification  !   <br>";

// defined('_JEXEC') or die('Restricted access');

onPaymentNotification(&$statuses);
echo "finishing notification   !   ";
?>

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #34583

Hi,

Yes it's possible. Here is a thread where another developer had the same issue and the solution:
www.hikashop.com/support/forum/4-how-to/...art=20&lang=en#13262

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
12 years 10 months ago #34589

Hi, thanks for your quick answer!

I think that i have thr same problem of emilio from the topic that you said.
But in my case, i need hold on the multilingual plgin of joomla, because full website is working now...

In the topic you said that its possible to develop more complex redirection, do you have an idea about it? Can you help me a little more?

Thanks again,

I would favor giving up the plugin for new releases....

Good night,

:)

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #34591

You said that your payment gateway give back the notification information in the $_GET, so you won't have the redirection problem that emilio had because on his end the information was in the $_POST and the post information is not transfered automatically when you do a redirect, unlike $_GET information.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
12 years 10 months ago #35289

Hi again,

Im sorry, but i can't get it work.

When i redirecto with _GET parameters, i lose them because the language system plugin of Joomla 1.6 only mantains the &lang parameter.

I'm very interested finishing this plugin... :(

I asked my bank that provide me the payment gateway... and told me that the URL of notification is limited to 100 characters.

Do you hace some idea about make a .php file in the root system of server, and call from there the onpaymentfunction?

Is it possible including the necessary files? ...

:(

There are a lot of people in my country that uses this bank payment BBVA,... it would be very usefull to integrate to next hikashop release...

Thanks for all...

César

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #35292

Hi,

It might be because joomla uses directly the information from the $_SERVER instead of using the information from the $_GET.

The alternative will be to redirect to the SEFed URL yourself in that php file at the root of your website with something like that:

header('HTTP/1.1 303 See other');
$query = '';
$lang = '';
foreach($_GET as $k => $v){
 if($k == 'lang') $lang = '/'.$v;
 else $query.='/'.$k.'-'.$v;
}
$s ='';
if ( (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) != 'off')) ||
     		(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') ) {
 $s='s';
}
$folder='/';
$parts=explode('/',$_SERVER['PHP_SELF']);
if(count($parts)>1){
 array_pop($parts);
 $folder .= implode('/',$parts);
}
header('Location: http'.$s.'://'.$_SERVER["HTTP_HOST"].$folder.$lang.$query);
exit;

That should avoid loosing parameters but I can't guarantee that it will work because SEF systems are not the same for all joomla installations.

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum