CVS edit link for mansus

Hi,

My name is Javi Manso and I am from Spain. I have been working with Drupal for a year (but have been into software development for 4 years).
I have developed a module that lets users use the BBVA (Spanish Bank) Secure Server for paying.
This module contributes Ubercart project and allows users to pay his Ubercart orders using the BBVA Gateway.
I think it is quite useful because BBVA is the most important bank in Spain and many people want to use its secure server.
I have test the module in my production site for one month and everything has worked OK.

Although I have been using Open Source Software for quite a long time this is the first time I contribute something to the community. So I don't really know if I am missing something in this letter. If I have missed anything please let me know.

I hope you like it :-D

Comments

mansus’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new4.31 KB
avpaderno’s picture

Issue tags: +Module review

Hello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.

richar’s picture

Hola Javi... tan solo darte las gracias por esta fantástica aportación.... a mi me has salvado la vida.. o la web mejor dicho...;)

pcambra’s picture

I think this code should be merged with Ubercart sermepa payment systems (http://drupal.org/project/uc_sermepa), which is more generic (all sermepa modules, including bbva), more on this here: http://drupal.org/node/646044#comment-3025888

avpaderno’s picture

Status: Needs review » Needs work

I am changing status as per previous comment.

mansus’s picture

Hi pcambra,

as far as I know BBVA does not use Sermepa's Virtual TPV. In fact the workflow is different from the one is implemented in the module Ubercart Sermepa Payment Systems.

avpaderno’s picture

Status: Needs work » Needs review
pcambra’s picture

I'll review the module because BBVA does appear as member of Servired/Sermepa http://www.servired.es/espanol/miembros.htm

pcambra’s picture

I see what is happening, BBVA gives their clients the choice, they can use its own BBVA tpv or the sermepa general one.
The module for bbva is just a fork of http://drupal.org/project/uc_sermepa (1.x version) with the difference in the final process.

It would be cool if this could be merged into sermepa, uc_sermepa 2.x has a very configurable interface, it allows you to put the url by config, the encryption method, and a lot of parameters more, maybe the bbva config could be one of this parameters.

Let me know what you think.

mansus’s picture

Hey,

of course it would be nice to have a module that aggregates all the spanish banks payment options. We could study how to merge bbva tpv module with uc_sermepa. It would be great.

pcambra’s picture

Great!

Please, take a look to the uc_sermepa 2.x (1.x is deprecated) to see if you can merge the options in the settings of it, could you please open a issue there with the modifications?

Thanks!

mansus’s picture

StatusFileSize
new4.35 KB

Hello,

sorry for the late response but I am really busy these days and it will be hard to find time to look at a module that I have not developed and make a merge. As you are the one who better knows your module and you saw clearly how to merge BBVA module into Serpema Payment Systems feel free to merge it yourself if you have time to do it. It would be a pleasure. :-D

In any case, I found a bug in the BBVA module when using prices with decimal parts. I attach a new version with that patch. Maybe it can help someone while the merge is done.

Take care!

pcambra’s picture

Could you please attach this module in a new issue in uc_sermepa an mark this one as fixed?
Thanks

mansus’s picture

I have created a new issue in uc_sermepa with the attached code but still waiting for the CVS account application...

joachim’s picture

Status: Needs review » Postponed

You don't need CVS access to contribute patches to uc_sermepa or any other module.

If you want to co-maintain it, you should file an issue in that module's queue requesting co-maintainership. A module maintainer would expect to see several patches from you before considering granting co-maintainership.

celosae’s picture

Hi mansus, your module it's a good job.

I've a problem, I can connect to bbva gateway, and I can pay all products inside the cart.

But I don't get the feedback to the ubercart cart, and I can't complete the buying.

---

Hola mansus, buen trabajo.

Tengo un problema, consigo enlazar con la pasarela del BBVA, y pasarle la orden de pago.
Pero no consigo el feedback con ubercart, y no se me completa la compra en el lado de Ubercart.
Al BBVA le llega la compra perfectamente y ejecuta la compra, pero el carro de mi tienda no se vacía, ¿sabes donde puede estar el problema?

Gracias.

dave reid’s picture

Issue tags: +Ubercart

Would be great to have someone with Ubercart experience reviewing this application.

pcambra’s picture

David, module is already reviewed and hopefully will be integrated into Ubercart Sermepa Payment Systems http://drupal.org/project/uc_sermepa

mansus’s picture

StatusFileSize
new4.35 KB

Hello Celosae,

I attach the last version of the module I have. This is the one that I am using and for the moment it works great. I think it can solve your problem. Yesterday I also shared it with pcambra so soon it would be available from uc sermepa 1.x module project.

By the way, are you testing the module from the same domain that the TPV has been hired for? BBVA TPV only answers to the hired domain. I developed the module from an alternative domain and had to generate/emulate the answers. Maybe this can also solve your problem.

I hope this helps you.

celosae’s picture

I think I have find the problem. I'm using 3D Secure BBVA TPV, that's the problem.

I don't get feedback from bbva TPV to my virtual shop. The payment on bbva TPV it's OK but the CART on my shop is not update to "complete" state.

Now I must to modify your module for the 3D Secure gategaway.
I newer modifying drupal modules and PHP, but I have experience in other languages.
Where can I find information about how to connet ubercart and payment gateway?
I don't know nothig about the behaviour of shopping with drupal, buying states, etc.

If you want you can contact me by email.

pcambra’s picture

Status: Postponed » Closed (won't fix)

Thanks mansus, I've included your module as part of the sermepa payment systems module http://drupal.org/project/uc_sermepa

celosae, please use the issue queue of the module for getting support, this is not the place.

I'm closing this.

celosae’s picture

Component: Miscellaneous » miscellaneous
StatusFileSize
new4.4 KB

HI, Javi I use your BBVA module and modify it to work with BBVA 3D secure feature.

Here is the module file modified.

I had to modify too few ubercart lines to perform it to works. I not sure, perhaps I have to do that because I integrated ubercart with uc_hotel.

mansus’s picture

Hello Celosae,

thank you very much. I'll look at it to see what have changed. I have no access to a 3D secure gateway so I cannot help you with any testing.

massimoi’s picture

Dear Mansus,
first of all thanks a lot for the BBVA module.

I'm trying to use the bbva3d module with my e-commerce site but I don't know BBVA at all (its my first spanish project).

The transaction goes fine, but I don't get back the response from the bank (as if the bank didn't call bbva/get).

Would you be so kind to give me a hint?
1) Is there a place in the bank where I have to define the the url that the bank should call back?

2) Does this error tell you anything to help me? I always get this:
warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "/tmp/peticion.xml" in /uc_bbva/uc_bbva.module on line 267.

Any help appreciated!
Thanks a lot
Massimo

mansus’s picture

Hello Massimo,

let's see if I can help you...

1) As far as I can remember, BBVA gateway only answers to the domain attached to the gateway. So if your e-commerce site is example-shop.com, bbva will anwer to example-shop.com/bbva/get. You can configure bbva/get path in the web interface that BBVA has given to you but I think it will only answer to example-shop.com. So if you are developing in another domain because your real one is already in use you'll have to emulate the answers.

To know how to emulate those answers you can write a "dumb" hook_menu in your example-shop.com that listens the answer in bbva/get and log it so you can use it in you development site. You can do that or read de documentation and try to do it yourself :-)

2) The second error can happen due to permissions. The module is trying to write in your tmp folder a xml file to then read it. Probably the process has not the right permissions to write there. I guess this was not a good "design" decission and I should write some code that replaces that part and processess the xml answer "directly". If you write a snippet that replaces that piece of code you can submit the patch.

And that's it. If you can use and test the module for the 3D Gateway would be really nice. Right now is only tested in the "normal" one (I have no access to a 3D gateway).

Hope this helps!

pcambra’s picture

I've just updated Uc_sermepa to have 3D support: http://drupal.org/project/uc_sermepa

dcoder’s picture

Is there any document or post about TPV-BBVA - Ubercart /// using Thawte´s security ceritificate- ?
Is the first time with this platform/gateway -I'm working for a spanish client- without access to the BBVA's support from my country. Any help will be greatly appreciated! Thanks!

Existirá algún manual o articulo de soporte para el TPV BBVA -utlizando certificados de seguridad tipo Thawte-? Es la primera vez que uso este gateway -para un cliente español- y no tengo acceso a los servicios de soporte del banco. Les agradecería cualquier ayuda o comentario. Muchas gracias!

dcoder’s picture

The 3D support is available in 2.0? or just 1.0 of the uc_sermepa module?
thanks for the great work!

luis_san’s picture

Hello Pedro, how are you? I know you from BCN Drupal Day (I'm from Uruguay)... so....

I'm using sermepa/uc_bbva module and I needed to make some changes to module works.
(this is a test code... but works)

  //OLD CODE
  /*$peticion = "<tpv><oppago><idterminal>" . $id_terminal . "</idterminal><idcomercio>" . $id_commerce . "</idcomercio><idtransaccion>" . $id_transaction . "</idtransaccion><moneda>" . $currency . "</moneda><importe>" . $amount_xml . "</importe><urlcomercio>" . $url_back . "</urlcomercio><idioma>" . $language . "</idioma> <urlredir>" . $url_redirect . "</urlredir><localizador>" . $localizador . "</localizador><firma>" . $signature . "</firma></oppago></tpv>";

  $form['#action'] = $url_tpv;

  str_replace(" ", "", $peticion);

  $form['peticion'] = array('#type' => 'hidden', '#value' => str_replace(" ", "", $peticion));*/

  //NEW CODE
  $form['#action'] = $url_tpv;
  $form['Ds_Merchant_MerchantCode'] = array(
	'#type' => 'hidden', 
	'#value' => $id_terminal,
	'#name' => 'Ds_Merchant_MerchantCode'
  );
  $form['Ds_Merchant_Terminal'] = array(
	'#type' => 'hidden', 
	'#value' => $id_commerce,
	'#name' => 'Ds_Merchant_Terminal'
  );
  $form['Ds_Merchant_Currency'] = array(
	'#type' => 'hidden', 
	'#value' => $currency,
	'#name' => 'Ds_Merchant_Currency'
  );
  $form['Ds_Merchant_Amount'] = array(
	'#type' => 'hidden', 
	'#value' => $amount,
	'#name' => 'Ds_Merchant_Amount'
  );
  $order = date('ymdHis');
  $form['Ds_Merchant_Order'] = array(
	'#type' => 'hidden', 
	'#value' => $order,
	'#name' => 'Ds_Merchant_Order'
  );
  $form['Ds_Merchant_TransactionType'] = array(
	'#type' => 'hidden', 
	'#value' => '0',
	'#name' => 'Ds_Merchant_TransactionType'
  );
  $urlMerchant = 'http://www.xxx.com';
  $form['Ds_Merchant_MerchantURL'] = array(
	'#type' => 'hidden', 
	'#value' => $urlMerchant,
	'#name' => 'Ds_Merchant_MerchantURL'
  );
  $message = $amount.$order.$id_terminal.$currency.$secret_key;

  $signature = strtoupper(sha1($message));
  $form['Ds_Merchant_MerchantSignature'] = array(
	'#type' => 'hidden', 
	'#value' => $signature,
	'#name' => 'Ds_Merchant_MerchantSignature'
  );



  $form['submit'] = array(

    '#type' => 'submit',

    '#value' => t('Continuar'),

  );

Ds_Merchant_Terminal and Ds_Merchant_MerchantCode are inverted because following code get vars values inverted.

  //id_terminal

  $id_commerce = variable_get('ec_bbva_id_terminal', '');



  //id_commerce

  $id_terminal = variable_get('ec_bbva_id_commerce', '');

Espero que les sirva.

saludos

avpaderno’s picture

Component: miscellaneous » new project application
Issue summary: View changes
Issue tags: -Ubercart