CVS edit link for mariohmol

I'm already on brazil tranlations email group.

In uc_boleto project, a brazillian pattern to make bank payment, i made a Itau and BancodoBrasil support.

My main motivation is to create a uc_shopline, a project to integrate ubercart into Itau Shopline (as a paypal for Itau accounts).

CommentFileSizeAuthor
#5 pedido.jpg40.64 KBmariohmol
#5 itau.jpg39.86 KBmariohmol
#3 uc_shopline.zip14.28 KBmariohmol
#1 uc_boleto.zip88.33 KBmariohmol

Comments

mariohmol’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new88.33 KB

Files attached here is the modification of uc_boleto , includding BancodoBrasil and Itau Support.

I made some changes for multiBank support that is almost finished, so i commented as TODO.
http://drupal.org/node/656518

Afterwards i will publish the module that i'm developing for Itau Shopline (uc_shopline).

Cheers,

avpaderno’s picture

Status: Needs review » Closed (won't fix)

As UC Boleto is already an existing project (http://drupal.org/project/uc_boleto), this is an application to become co-maintainer.
Please follow the procedure to become co-maintainer as reported in http://drupal.org/cvs-application/requirements#comaintain.

mariohmol’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new14.28 KB

OK, thats what i was looking for in uc_boleto project, be a co-maintainer.

But now i would like to create a project, called uc_shopline.

This is a integration with a Java component to Pay Using Itau Shopline, the biggest brazillian Bank.

Thanks

avpaderno’s picture

Status: Needs review » Needs work
Issue tags: +Module review

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

As per requirements, the motivation message should be expanded to contain more features of the proposed project. For themes, it should include also a screenshot of the theme, and (when possible) a link to a working demo site using the proposed theme; for modules, it should include also a comparison with the existing solutions.

mariohmol’s picture

StatusFileSize
new39.86 KB
new40.64 KB

Allright, take a look if this is enought.

The biggest brazillian bank is called Itau and I beleave that is the biggest from Latin America. This bank have a Online Payment Method, similar as Paypal. I'm developing a website that uses this payment method and now i'm sharing this with drupal community.

This website uses Ubercart to manage the cart and then I made this module to work as a Ubercart Payment Method.

Attached here is two printscreens, pedido.jpg shows the module integrated with drupal and itau.jpg shows the screen is opened to make the payment on itau.

This module is similar from others ubercart payment modules, but makes a different integration , in this case with Itau Shopline.

I'm available to answer any other doubts.

Cheers

avpaderno’s picture

Status: Needs work » Needs review

Thank you for your reply.

mariohmol’s picture

Well guys... 2 months later nothing has changed... is it normal?

If drupal process goes slow like this i will quit to help drupal community.

cheers,

avpaderno’s picture

Issue tags: +Ubercart

I am adding the tag we are using for Ubercart related modules.

avpaderno’s picture

Status: Needs review » Needs work
  • This is a partial review.
  • The points reported in this review are not in order of importance / relevance.
  • Most of the times I report the code that present an issue. In such cases, the same error can be present in other parts of the code; the fact I don't report the same issue more than once doesn't mean the same issue is not present in different places.
  • Not all the reported points are application blockers; some of the points I report are simple suggestions to who applies for a CVS account. For a list of what is considered a blocker for the application approval, see CVS applications review, what to expect. Keep in mind the list is still under construction, and can be changed to adapt it to what has been found out during code review, or to make the list clearer to who applies for a CVS account.
  1. version = "6.1.x-dev"
    core = "6.x"
    project = "uc_shopline"
    

    Those lines need to be removed from the .info file.

  2. License files cannot be committed in Drupal.org repository. Projects committed in Drupal.org repository have the same license used by Drupal.
  3. Files available from third-party sites should not be committed in Drupal.org repository. Files licensed under a license different from GPL License (even if it is a compatible license) should not be committed in Drupal.org repositories.
  4. $valor_cobrado = $order->order_total;
    $valor_cobrado = str_replace(",", ".", $valor_cobrado);
    $valor=number_format($valor_cobrado+$taxa_boleto, 2, ',', '');
    $cpfSacado=variable_get('uc_boleto_company_id', '');
    $dataVencimento=str_replace("/","",$this->data["data_vencimento"]);
    

    See http://drupal.org/coding-standards to understand how a module should be written. In particular, see how PHP variables should be named.

  5. function uc_shopline_uninstall() {
      db_query("DELETE FROM {variable} WHERE name LIKE 'uc_shopline_%%'");
    }
    

    Deleting Drupal variables using a query that matches any Drupal variable with a name that starts with the module name would remove also the Drupal variables of other modules.

  6. 	if (variable_get('uc_boleto_use_due_date', 0)) {
    		$date = variable_get('uc_boleto_due_date', NULL);
    		if (!empty($date)) {
    			$data_venc = $this->dateDefaultFormat($date);
    		}
    	}
    

    Why is the code using Drupal variables like uc_boleto_due_date, if the module doesn't declare its dependency from uc_boleto.module?

  7. 	$valor=number_format($valor_cobrado+$taxa_boleto, 2, ',', '');
    	$cpfSacado=variable_get('uc_boleto_company_id', '');
    	$dataVencimento=str_replace("/","",$data_venc);
    	$codEmp =variable_get('uc_shopline_company', '');
    	$chave=variable_get('uc_shopline_key', '');
    
    

    See http://drupal.org/coding-standards to understand how a module should be written. In particular, see how the code should be formatted (and which indentation should be used); how constant names should be written.

  8. 	$saida='<FORM action="https://shopline.itau.com.br/shopline/shopline.asp"
    	method="post" name="form" onsubmit=carregabrw() target="SHOPLINE">
    	<INPUT type="hidden" name="DC" value="'.$dados.'"> <BR>
    <INPUT type="submit" name="Shopline" value="'.$text.'"></FORM>
    <script language="JavaScript">
                              function carregabrw()
                               {
              window.open("","SHOPLINE","toolbar=yes,menubar=yes,resizable=yes,status=no,scrollbars=yes,width=675,height=485");
                                       }
                 </script>';
    
    	if (empty($text)) {
    		$text = url($path, array('absolute' => TRUE));
    	}
    	return $saida;
    
    

    Forms should be generated using the form API.

  9. 			$form['uc_shopline_company'] = array(
            '#type' => 'textfield',
            '#title' => t('Company'),
            '#description' => t('Inform the company\'s registration number'),
            '#size' => 27,
            '#maxlength' => 27,
            '#default_value' => variable_get('uc_shopline_company', ''),
    			);
    
    

    Avoid to escape a string delimiter inside a string, especially if the string is passed to t().

  10. 		case 'cart-details':
    			return t('Your order will be complete as soon as you pay from Itau Shopline and we receive the payment confirmation from the bank');
    			break;
    
    

    break is not necessary, after return.

  11. 	$order_id = db_result(db_query(
        "SELECT order_id FROM {uc_orders} WHERE MD5( CONCAT(order_id, primary_email) ) = '%s'", $hash
    	));
    
    

    The SQL query is probably not compatible with all the database engines Drupal is compatible with.

  12. Remove any debugging code.
avpaderno’s picture

Status: Needs work » Closed (won't fix)

Please read the following links as this is very important information about CVS applications.

avpaderno’s picture

Component: Miscellaneous » new project application
Issue summary: View changes