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
Conversation
There was a problem hiding this 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'); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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.
??? 😆
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
…upport for custom due date
Closes #363.