Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new method payment: Baloto #371

Merged
merged 9 commits into from Mar 24, 2017
Merged

Add new method payment: Baloto #371

merged 9 commits into from Mar 24, 2017

Conversation

guilhermepiovesan
Copy link
Contributor

Closes #363.

Copy link
Contributor

@cezarsmpio cezarsmpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About the ebanx-baloto.png, did you talk to @fabian0souza about the icon? If not, please, talk to him to send to you the right icon.


$this->api_name = 'baloto';
$this->title = __('Baloto', 'woocommerce-gateway-ebanx');
$this->description = __('Paga con boleta Baloto.', 'woocommerce-gateway-ebanx');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, talk to Larissa or Liciane if this text is right. Maybe just Paga con Baloto resolves.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I talked to Larissa. The text will be: Paga con Baloto.

}

/**
* Check if the currency is processed by EBANX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put a space between the description and rest of the comment.

* @param WC_Order $order The order created
* @return void
*/
public static function thankyou_page($order)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to talk to @fabian0souza about the layout of this page. Will be the same of others cash payments like Boleto or Oxxo? Because, we need to talk to pay guys if there the basic, pdf and print versions of Baloto.


parent::thankyou_page($data);

wp_enqueue_script('woocommerce_ebanx_clipboard', plugins_url('assets/js/vendor/clipboard.min.js', WC_EBANX::DIR));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scripts must be placed on footer, see other documents or search about the wp_enqueue_script method.

parent::thankyou_page($data);

wp_enqueue_script('woocommerce_ebanx_clipboard', plugins_url('assets/js/vendor/clipboard.min.js', WC_EBANX::DIR));
wp_enqueue_script('woocommerce_ebanx_order_received', plugins_url('assets/js/order-received.js', WC_EBANX::DIR));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same above.

@@ -836,6 +858,12 @@ protected function save_user_meta_fields($order)
update_user_meta($this->userId, '_ebanx_billing_chile_birth_date', sanitize_text_field($_POST['ebanx_billing_chile_birth_date']));
}
}

if (trim(strtolower($order->billing_country)) === WC_EBANX_Gateway_Utils::COUNTRY_COLOMBIA) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, use $this->getTransactionAddress('country') instead of trim(strtolower($order->billing_country)).

@@ -1,6 +1,6 @@
=== EBANX Payment Gateway for WooCommerce ===
Contributors: ebanxwp
Tags: credit card, boleto, ebanx, woocommerce, approval rate, conversion rate, brazil, mexico, peru, colombia, chile, oxxo, cash payment, local payment one-click payment, installments, alternative payments, accept more payments
Tags: credit card, boleto, ebanx, woocommerce, approval rate, conversion rate, brazil, mexico, peru, colombia, chile, oxxo, baloto, cash payment, local payment one-click payment, installments, alternative payments, accept more payments
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -113,6 +113,7 @@ The [Developer’s Academy](https://www.ebanx.com/business/en/developers/integra
* SafetyPay, Cash Payment / Debit Transfer
* Colombia
* Pagos Seguros en Línea (PSE), Online Debit Transfer
* Baloto
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

?>

<div class="woocommerce-message">
<span><?php _e('Payment successfully made using Baloto.', 'woocommerce-gateway-ebanx' ); ?></span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What? We are on file payment-failed but the message is: Payment successfully made using Baloto.??? 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is really wrong 😖 I'll fix it.
But look at the template files from safetypay and servipag. I followed them, should we correct them too?

?>

<div class="woocommerce-message">
<span><?php _e('Payment successfully made using Baloto.', 'woocommerce-gateway-ebanx' ); ?></span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@cezarsmpio cezarsmpio merged commit 1722d97 into develop Mar 24, 2017
@gpressutto5 gpressutto5 deleted the feature/baloto branch July 20, 2017 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants