Version Description
26/07/2013 =
Adicionada traduo para es_ES por Marcelo Pedra
Adicionado o filtro
woocommerce_mercadopago_icon
para a modificao do cone durante o checkout.Adicionado parmetro $order no filtro
woocommerce_mercadopago_args
.Melhorias no cdigo.
Download this release
Release Info
Developer | claudiosanches |
Plugin | WooCommerce MercadoPago |
Version | 1.5.0 |
Comparing to | |
See all releases |
Version 1.5.0
- class-wc-mercadopago-gateway.php +574 -0
- images/mercadopago.png +0 -0
- languages/wcmercadopago-es_AR.mo +0 -0
- languages/wcmercadopago-es_AR.po +337 -0
- languages/wcmercadopago-es_ES.mo +0 -0
- languages/wcmercadopago-es_ES.po +337 -0
- languages/wcmercadopago-pt_BR.mo +0 -0
- languages/wcmercadopago-pt_BR.po +337 -0
- readme.txt +261 -0
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- wc-mercadopago.php +96 -0
class-wc-mercadopago-gateway.php
ADDED
@@ -0,0 +1,574 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WC MercadoPago Gateway Class.
|
4 |
+
*
|
5 |
+
* Built the MercadoPago method.
|
6 |
+
*/
|
7 |
+
class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Constructor for the gateway.
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
public function __construct() {
|
15 |
+
global $woocommerce;
|
16 |
+
|
17 |
+
// Standards
|
18 |
+
$this->id = 'mercadopago';
|
19 |
+
$this->icon = apply_filters( 'woocommerce_mercadopago_icon', plugins_url( 'images/mercadopago.png', __FILE__ ) );
|
20 |
+
$this->has_fields = false;
|
21 |
+
$this->method_title = __( 'MercadoPago', 'wcmercadopago' );
|
22 |
+
|
23 |
+
// API urls.
|
24 |
+
$this->payment_url = 'https://api.mercadolibre.com/checkout/preferences?access_token=';
|
25 |
+
$this->ipn_url = 'https://api.mercadolibre.com/collections/notifications/';
|
26 |
+
$this->sandbox_ipn_url = 'https://api.mercadolibre.com/sandbox/collections/notifications/';
|
27 |
+
$this->oauth_token = 'https://api.mercadolibre.com/oauth/token';
|
28 |
+
|
29 |
+
// Load the form fields.
|
30 |
+
$this->init_form_fields();
|
31 |
+
|
32 |
+
// Load the settings.
|
33 |
+
$this->init_settings();
|
34 |
+
|
35 |
+
// Define user set variables.
|
36 |
+
$this->title = $this->settings['title'];
|
37 |
+
$this->description = $this->settings['description'];
|
38 |
+
$this->client_id = $this->settings['client_id'];
|
39 |
+
$this->client_secret = $this->settings['client_secret'];
|
40 |
+
$this->invoice_prefix = ! empty( $this->settings['invoice_prefix'] ) ? $this->settings['invoice_prefix'] : 'WC-';
|
41 |
+
$this->method = ! empty( $this->settings['method'] ) ? $this->settings['method'] : 'modal';
|
42 |
+
$this->sandbox = isset( $this->settings['sandbox'] ) ? $this->settings['sandbox'] : false;
|
43 |
+
$this->debug = $this->settings['debug'];
|
44 |
+
|
45 |
+
// Actions.
|
46 |
+
add_action( 'woocommerce_api_wc_mercadopago_gateway', array( &$this, 'check_ipn_response' ) );
|
47 |
+
add_action( 'valid_mercadopago_ipn_request', array( &$this, 'successful_request' ) );
|
48 |
+
add_action( 'woocommerce_receipt_mercadopago', array( &$this, 'receipt_page' ) );
|
49 |
+
add_action( 'wp_head', array( &$this, 'css' ) );
|
50 |
+
if ( version_compare( WOOCOMMERCE_VERSION, '2.0.0', '>=' ) )
|
51 |
+
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( &$this, 'process_admin_options' ) );
|
52 |
+
else
|
53 |
+
add_action( 'woocommerce_update_options_payment_gateways', array( &$this, 'process_admin_options' ) );
|
54 |
+
|
55 |
+
// Valid for use.
|
56 |
+
$this->enabled = ( 'yes' == $this->settings['enabled'] ) && ! empty( $this->client_id ) && ! empty( $this->client_secret ) && $this->is_valid_for_use();
|
57 |
+
|
58 |
+
// Checks if client_id is not empty.
|
59 |
+
if ( empty( $this->client_id ) )
|
60 |
+
add_action( 'admin_notices', array( &$this, 'client_id_missing_message' ) );
|
61 |
+
|
62 |
+
// Checks if client_secret is not empty.
|
63 |
+
if ( empty( $this->client_secret ) )
|
64 |
+
add_action( 'admin_notices', array( &$this, 'client_secret_missing_message' ) );
|
65 |
+
|
66 |
+
// Active logs.
|
67 |
+
if ( 'yes' == $this->debug )
|
68 |
+
$this->log = $woocommerce->logger();
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Check if this gateway is enabled and available in the user's country.
|
73 |
+
*
|
74 |
+
* @return bool
|
75 |
+
*/
|
76 |
+
public function is_valid_for_use() {
|
77 |
+
if ( ! in_array( get_woocommerce_currency(), array( 'ARS', 'BRL', 'MXN', 'USD', 'VEF' ) ) )
|
78 |
+
return false;
|
79 |
+
|
80 |
+
return true;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Admin Panel Options.
|
85 |
+
*/
|
86 |
+
public function admin_options() {
|
87 |
+
?>
|
88 |
+
<h3><?php _e( 'MercadoPago standard', 'wcmercadopago' ); ?></h3>
|
89 |
+
<p><?php _e( 'MercadoPago standard works by sending the user to MercadoPago to enter their payment information.', 'wcmercadopago' ); ?></p>
|
90 |
+
<table class="form-table">
|
91 |
+
<?php $this->generate_settings_html(); ?>
|
92 |
+
</table>
|
93 |
+
<?php
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Initialise Gateway Settings Form Fields.
|
98 |
+
*
|
99 |
+
* @return void
|
100 |
+
*/
|
101 |
+
public function init_form_fields() {
|
102 |
+
|
103 |
+
$api_secret_locale = sprintf( '<a href="https://www.mercadopago.com/mla/herramientas/aplicaciones" target="_blank">%1$s</a>, <a href="https://www.mercadopago.com/mlb/ferramentas/aplicacoes" target="_blank">%2$s</a>, <a href="https://www.mercadopago.com/mlm/herramientas/aplicaciones" target="_blank">%3$s</a> %5$s <a href="https://www.mercadopago.com/mlv/herramientas/aplicaciones" target="_blank">%4$s</a>', __( 'Argentine', 'wcmercadopago' ), __( 'Brazil', 'wcmercadopago' ), __( 'Mexico', 'wcmercadopago' ), __( 'Venezuela', 'wcmercadopago' ), __( 'or', 'wcmercadopago' ) );
|
104 |
+
|
105 |
+
$this->form_fields = array(
|
106 |
+
'enabled' => array(
|
107 |
+
'title' => __( 'Enable/Disable', 'wcmercadopago' ),
|
108 |
+
'type' => 'checkbox',
|
109 |
+
'label' => __( 'Enable MercadoPago standard', 'wcmercadopago' ),
|
110 |
+
'default' => 'yes'
|
111 |
+
),
|
112 |
+
'title' => array(
|
113 |
+
'title' => __( 'Title', 'wcmercadopago' ),
|
114 |
+
'type' => 'text',
|
115 |
+
'description' => __( 'This controls the title which the user sees during checkout.', 'wcmercadopago' ),
|
116 |
+
'desc_tip' => true,
|
117 |
+
'default' => __( 'MercadoPago', 'wcmercadopago' )
|
118 |
+
),
|
119 |
+
'description' => array(
|
120 |
+
'title' => __( 'Description', 'wcmercadopago' ),
|
121 |
+
'type' => 'textarea',
|
122 |
+
'description' => __( 'This controls the description which the user sees during checkout.', 'wcmercadopago' ),
|
123 |
+
'default' => __( 'Pay via MercadoPago', 'wcmercadopago' )
|
124 |
+
),
|
125 |
+
'client_id' => array(
|
126 |
+
'title' => __( 'MercadoPago Client_id', 'wcmercadopago' ),
|
127 |
+
'type' => 'text',
|
128 |
+
'description' => __( 'Please enter your MercadoPago Client_id.', 'wcmercadopago' ) . ' ' . sprintf( __( 'You can to get this information in MercadoPago from %s.', 'wcmercadopago' ), $api_secret_locale ),
|
129 |
+
'default' => ''
|
130 |
+
),
|
131 |
+
'client_secret' => array(
|
132 |
+
'title' => __( 'MercadoPago Client_secret', 'wcmercadopago' ),
|
133 |
+
'type' => 'text',
|
134 |
+
'description' => __( 'Please enter your MercadoPago Client_secret.', 'wcmercadopago' ) . ' ' . sprintf( __( 'You can to get this information in MercadoPago from %s.', 'wcmercadopago' ), $api_secret_locale ),
|
135 |
+
'default' => ''
|
136 |
+
),
|
137 |
+
'invoice_prefix' => array(
|
138 |
+
'title' => __( 'Invoice Prefix', 'wcmercadopago' ),
|
139 |
+
'type' => 'text',
|
140 |
+
'description' => __( 'Please enter a prefix for your invoice numbers. If you use your MercadoPago account for multiple stores ensure this prefix is unqiue as MercadoPago will not allow orders with the same invoice number.', 'wcmercadopago' ),
|
141 |
+
'desc_tip' => true,
|
142 |
+
'default' => 'WC-'
|
143 |
+
),
|
144 |
+
'method' => array(
|
145 |
+
'title' => __( 'Integration method', 'wcmercadopago' ),
|
146 |
+
'type' => 'select',
|
147 |
+
'description' => __( 'Choose how the customer will interact with the MercadoPago. Modal Window (Inside your store) Redirect (Client goes to MercadoPago).', 'wcmercadopago' ),
|
148 |
+
'desc_tip' => true,
|
149 |
+
'default' => 'modal',
|
150 |
+
'options' => array(
|
151 |
+
'modal' => __( 'Modal Window', 'wcmercadopago' ),
|
152 |
+
'redirect' => __( 'Redirect', 'wcmercadopago' ),
|
153 |
+
)
|
154 |
+
),
|
155 |
+
'testing' => array(
|
156 |
+
'title' => __( 'Gateway Testing', 'wcmercadopago' ),
|
157 |
+
'type' => 'title',
|
158 |
+
'description' => '',
|
159 |
+
),
|
160 |
+
'sandbox' => array(
|
161 |
+
'title' => __( 'MercadoPago Sandbox', 'wcmercadopago' ),
|
162 |
+
'type' => 'checkbox',
|
163 |
+
'label' => __( 'Enable MercadoPago sandbox', 'wcmercadopago' ),
|
164 |
+
'default' => 'no',
|
165 |
+
'description' => __( 'MercadoPago sandbox can be used to test payments.', 'wcmercadopago' ),
|
166 |
+
),
|
167 |
+
'debug' => array(
|
168 |
+
'title' => __( 'Debug Log', 'wcmercadopago' ),
|
169 |
+
'type' => 'checkbox',
|
170 |
+
'label' => __( 'Enable logging', 'wcmercadopago' ),
|
171 |
+
'default' => 'no',
|
172 |
+
'description' => sprintf( __( 'Log MercadoPago events, such as API requests, inside %s', 'wcmercadopago' ), '<code>woocommerce/logs/mercadopago' . sanitize_file_name( wp_hash( 'mercadopago' ) ) . '.txt</code>' ),
|
173 |
+
)
|
174 |
+
);
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Generate the args to form.
|
179 |
+
*
|
180 |
+
* @param array $order Order data.
|
181 |
+
*
|
182 |
+
* @return array
|
183 |
+
*/
|
184 |
+
public function get_form_args( $order ) {
|
185 |
+
|
186 |
+
$args = array(
|
187 |
+
'back_urls' => array(
|
188 |
+
'success' => esc_url( $this->get_return_url( $order ) ),
|
189 |
+
'failure' => esc_url( $order->get_cancel_order_url() ),
|
190 |
+
'pending' => esc_url( $this->get_return_url( $order ) )
|
191 |
+
),
|
192 |
+
'payer' => array(
|
193 |
+
'name' => $order->billing_first_name,
|
194 |
+
'surname' => $order->billing_last_name,
|
195 |
+
'email' => $order->billing_email
|
196 |
+
),
|
197 |
+
'external_reference' => $this->invoice_prefix . $order->id,
|
198 |
+
'items' => array(
|
199 |
+
array(
|
200 |
+
'quantity' => 1,
|
201 |
+
'unit_price' => (float) $order->order_total,
|
202 |
+
'currency_id' => get_woocommerce_currency(),
|
203 |
+
// 'picture_url' => 'https://www.mercadopago.com/org-img/MP3/home/logomp3.gif'
|
204 |
+
)
|
205 |
+
)
|
206 |
+
);
|
207 |
+
|
208 |
+
// Cart Contents.
|
209 |
+
$item_names = array();
|
210 |
+
|
211 |
+
if ( sizeof( $order->get_items() ) > 0 ) {
|
212 |
+
foreach ( $order->get_items() as $item ) {
|
213 |
+
if ( $item['qty'] )
|
214 |
+
$item_names[] = $item['name'] . ' x ' . $item['qty'];
|
215 |
+
}
|
216 |
+
}
|
217 |
+
|
218 |
+
$args['items'][0]['title'] = sprintf( __( 'Order %s', 'wcmercadopago' ), $order->get_order_number() ) . ' - ' . implode( ', ', $item_names );
|
219 |
+
|
220 |
+
// Shipping Cost item.
|
221 |
+
if ( $order->get_shipping() > 0 )
|
222 |
+
$args['items'][0]['title'] .= ', ' . __( 'Shipping via', 'wcmercadopago' ) . ' ' . ucwords( $order->shipping_method_title );
|
223 |
+
|
224 |
+
$args = apply_filters( 'woocommerce_mercadopago_args', $args, $order );
|
225 |
+
|
226 |
+
return $args;
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Generate the MercadoPago payment url.
|
231 |
+
*
|
232 |
+
* @param object $order Order Object.
|
233 |
+
*
|
234 |
+
* @return string MercadoPago payment url.
|
235 |
+
*/
|
236 |
+
protected function get_mercadopago_url( $order ) {
|
237 |
+
$args = json_encode( $this->get_form_args( $order ) );
|
238 |
+
|
239 |
+
if ( 'yes' == $this->debug )
|
240 |
+
$this->log->add( 'mercadopago', 'Payment arguments for order ' . $order->get_order_number() . ': ' . print_r( $this->get_form_args( $order ), true ) );
|
241 |
+
|
242 |
+
$url = $this->payment_url . $this->get_client_credentials();
|
243 |
+
|
244 |
+
$params = array(
|
245 |
+
'body' => $args,
|
246 |
+
'sslverify' => false,
|
247 |
+
'timeout' => 30,
|
248 |
+
'headers' => array( 'content-type' => 'application/json;charset=UTF-8' )
|
249 |
+
);
|
250 |
+
|
251 |
+
$response = wp_remote_post( $url, $params );
|
252 |
+
|
253 |
+
if ( ! is_wp_error( $response ) && $response['response']['code'] == 201 && ( strcmp( $response['response']['message'], 'Created' ) == 0 ) ) {
|
254 |
+
$checkout_info = json_decode( $response['body'] );
|
255 |
+
|
256 |
+
if ( 'yes' == $this->debug )
|
257 |
+
$this->log->add( 'mercadopago', 'Payment link generated with success from MercadoPago' );
|
258 |
+
|
259 |
+
if ( 'yes' == $this->sandbox )
|
260 |
+
return esc_url( $checkout_info->sandbox_init_point );
|
261 |
+
else
|
262 |
+
return esc_url( $checkout_info->init_point );
|
263 |
+
|
264 |
+
} else {
|
265 |
+
if ( 'yes' == $this->debug )
|
266 |
+
$this->log->add( 'mercadopago', 'Generate payment error response: ' . print_r( $response, true ) );
|
267 |
+
}
|
268 |
+
|
269 |
+
return false;
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* Generate the form.
|
274 |
+
*
|
275 |
+
* @param mixed $order_id
|
276 |
+
*
|
277 |
+
* @return string
|
278 |
+
*/
|
279 |
+
public function generate_form( $order_id ) {
|
280 |
+
|
281 |
+
$order = new WC_Order( $order_id );
|
282 |
+
$url = $this->get_mercadopago_url( $order );
|
283 |
+
|
284 |
+
if ( $url ) {
|
285 |
+
|
286 |
+
// Display checkout.
|
287 |
+
$html = '<p>' . __( 'Thank you for your order, please click the button below to pay with MercadoPago.', 'wcmercadopago' ) . '</p>';
|
288 |
+
|
289 |
+
$html .= '<a id="submit-payment" href="' . $url . '" name="MP-Checkout" class="button alt" mp-mode="modal">' . __( 'Pay via MercadoPago', 'wcmercadopago' ) . '</a> <a class="button cancel" href="' . esc_url( $order->get_cancel_order_url() ) . '">' . __( 'Cancel order & restore cart', 'wcmercadopago' ) . '</a>';
|
290 |
+
|
291 |
+
// Add MercadoPago JS.
|
292 |
+
$html .= '<script type="text/javascript">(function(){function $MPBR_load(){window.$MPBR_loaded !== true && (function(){var s = document.createElement("script");s.type = "text/javascript";s.async = true;s.src = ("https:"==document.location.protocol?"https://www.mercadopago.com/org-img/jsapi/mptools/buttons/":"http://mp-tools.mlstatic.com/buttons/")+"render.js";var x = document.getElementsByTagName("script")[0];x.parentNode.insertBefore(s, x);window.$MPBR_loaded = true;})();}window.$MPBR_loaded !== true ? (window.attachEvent ? window.attachEvent("onload", $MPBR_load) : window.addEventListener("load", $MPBR_load, false)) : null;})();</script>';
|
293 |
+
|
294 |
+
return $html;
|
295 |
+
} else {
|
296 |
+
// Display message if a problem occurs.
|
297 |
+
$html = '<p>' . __( 'An error has occurred while processing your payment, please try again. Or contact us for assistance.', 'wcmercadopago' ) . '</p>';
|
298 |
+
|
299 |
+
$html .= '<a class="button cancel" href="' . esc_url( $order->get_cancel_order_url() ) . '">' . __( 'Click to try again', 'wcmercadopago' ) . '</a>';
|
300 |
+
|
301 |
+
return $html;
|
302 |
+
}
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Fix MercadoPago CSS.
|
307 |
+
*
|
308 |
+
* @return string Styles.
|
309 |
+
*/
|
310 |
+
public function css() {
|
311 |
+
echo '<style type="text/css">#MP-Checkout-dialog { z-index: 9999 !important; }</style>';
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Process the payment and return the result.
|
316 |
+
*
|
317 |
+
* @param int $order_id
|
318 |
+
*
|
319 |
+
* @return array
|
320 |
+
*/
|
321 |
+
public function process_payment( $order_id ) {
|
322 |
+
|
323 |
+
$order = new WC_Order( $order_id );
|
324 |
+
|
325 |
+
// Redirect or modal window integration.
|
326 |
+
if ( 'redirect' == $this->method ) {
|
327 |
+
return array(
|
328 |
+
'result' => 'success',
|
329 |
+
'redirect' => $this->get_mercadopago_url( $order )
|
330 |
+
);
|
331 |
+
} else {
|
332 |
+
if ( version_compare( WOOCOMMERCE_VERSION, '2.1', '>=' ) ) {
|
333 |
+
return array(
|
334 |
+
'result' => 'success',
|
335 |
+
'redirect' => $order->get_checkout_payment_url( true )
|
336 |
+
);
|
337 |
+
} else {
|
338 |
+
return array(
|
339 |
+
'result' => 'success',
|
340 |
+
'redirect' => add_query_arg( 'order', $order->id, add_query_arg( 'key', $order->order_key, get_permalink( woocommerce_get_page_id( 'pay' ) ) ) )
|
341 |
+
);
|
342 |
+
}
|
343 |
+
}
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Output for the order received page.
|
348 |
+
*
|
349 |
+
* @return void
|
350 |
+
*/
|
351 |
+
public function receipt_page( $order ) {
|
352 |
+
echo $this->generate_form( $order );
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Get cliente token.
|
357 |
+
*
|
358 |
+
* @return mixed Sucesse return the token and error return null.
|
359 |
+
*/
|
360 |
+
protected function get_client_credentials() {
|
361 |
+
|
362 |
+
if ( 'yes' == $this->debug )
|
363 |
+
$this->log->add( 'mercadopago', 'Getting client credentials...' );
|
364 |
+
|
365 |
+
// Set postdata.
|
366 |
+
$postdata = 'grant_type=client_credentials';
|
367 |
+
$postdata .= '&client_id=' . $this->client_id;
|
368 |
+
$postdata .= '&client_secret=' . $this->client_secret;
|
369 |
+
|
370 |
+
// Built wp_remote_post params.
|
371 |
+
$params = array(
|
372 |
+
'body' => $postdata,
|
373 |
+
'sslverify' => false,
|
374 |
+
'timeout' => 30
|
375 |
+
);
|
376 |
+
|
377 |
+
$response = wp_remote_post( $this->oauth_token, $params );
|
378 |
+
|
379 |
+
// Check to see if the request was valid and return the token.
|
380 |
+
if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 && ( strcmp( $response['response']['message'], 'OK' ) == 0 ) ) {
|
381 |
+
|
382 |
+
$token = json_decode( $response['body'] );
|
383 |
+
|
384 |
+
if ( 'yes' == $this->debug )
|
385 |
+
$this->log->add( 'mercadopago', 'Received valid response from MercadoPago' );
|
386 |
+
|
387 |
+
return $token->access_token;
|
388 |
+
} else {
|
389 |
+
if ( 'yes' == $this->debug )
|
390 |
+
$this->log->add( 'mercadopago', 'Received invalid response from MercadoPago. Error response: ' . print_r( $response, true ) );
|
391 |
+
}
|
392 |
+
|
393 |
+
return null;
|
394 |
+
}
|
395 |
+
|
396 |
+
/**
|
397 |
+
* Check ipn validity.
|
398 |
+
*
|
399 |
+
* @return mixed
|
400 |
+
*/
|
401 |
+
public function check_ipn_request_is_valid( $data ) {
|
402 |
+
|
403 |
+
if ( ! isset( $data['id'] ) )
|
404 |
+
return false;
|
405 |
+
|
406 |
+
if ( 'yes' == $this->debug )
|
407 |
+
$this->log->add( 'mercadopago', 'Checking IPN request...' );
|
408 |
+
|
409 |
+
if ( 'yes' == $this->sandbox )
|
410 |
+
$ipn_url = $this->sandbox_ipn_url;
|
411 |
+
else
|
412 |
+
$ipn_url = $this->ipn_url;
|
413 |
+
|
414 |
+
$url = $ipn_url . $data['id'] . '?access_token=' . $this->get_client_credentials();
|
415 |
+
|
416 |
+
// Send back post vars.
|
417 |
+
$params = array(
|
418 |
+
'sslverify' => false,
|
419 |
+
'timeout' => 30
|
420 |
+
);
|
421 |
+
|
422 |
+
// GET a response.
|
423 |
+
$response = wp_remote_get( $url, $params );
|
424 |
+
|
425 |
+
if ( 'yes' == $this->debug )
|
426 |
+
$this->log->add( 'mercadopago', 'IPN Response: ' . print_r( $response, true ) );
|
427 |
+
|
428 |
+
// Check to see if the request was valid.
|
429 |
+
if ( ! is_wp_error( $response ) && 200 == $response['response']['code'] ) {
|
430 |
+
|
431 |
+
$body = json_decode( $response['body'] );
|
432 |
+
|
433 |
+
$this->log->add( 'mercadopago', 'Received valid IPN response from MercadoPago' );
|
434 |
+
|
435 |
+
return $body;
|
436 |
+
} else {
|
437 |
+
if ( 'yes' == $this->debug )
|
438 |
+
$this->log->add( 'mercadopago', 'Received invalid IPN response from MercadoPago.' );
|
439 |
+
}
|
440 |
+
|
441 |
+
return false;
|
442 |
+
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Check API Response.
|
446 |
+
*
|
447 |
+
* @return void
|
448 |
+
*/
|
449 |
+
public function check_ipn_response() {
|
450 |
+
|
451 |
+
@ob_clean();
|
452 |
+
|
453 |
+
$data = $this->check_ipn_request_is_valid( $_GET );
|
454 |
+
|
455 |
+
if ( $data ) {
|
456 |
+
|
457 |
+
header( 'HTTP/1.1 200 OK' );
|
458 |
+
|
459 |
+
do_action( 'valid_mercadopago_ipn_request', $data );
|
460 |
+
|
461 |
+
} else {
|
462 |
+
|
463 |
+
wp_die( __( 'MercadoPago Request Failure', 'wcmercadopago' ) );
|
464 |
+
|
465 |
+
}
|
466 |
+
|
467 |
+
}
|
468 |
+
|
469 |
+
/**
|
470 |
+
* Successful Payment!
|
471 |
+
*
|
472 |
+
* @param array $posted
|
473 |
+
*
|
474 |
+
* @return void
|
475 |
+
*/
|
476 |
+
public function successful_request( $posted ) {
|
477 |
+
|
478 |
+
$data = $posted->collection;
|
479 |
+
$order_key = $data->external_reference;
|
480 |
+
|
481 |
+
if ( ! empty( $order_key ) ) {
|
482 |
+
$order_id = (int) str_replace( $this->invoice_prefix, '', $order_key );
|
483 |
+
|
484 |
+
$order = new WC_Order( $order_id );
|
485 |
+
|
486 |
+
// Checks whether the invoice number matches the order.
|
487 |
+
// If true processes the payment.
|
488 |
+
if ( $order->id === $order_id ) {
|
489 |
+
|
490 |
+
if ( 'yes' == $this->debug )
|
491 |
+
$this->log->add( 'mercadopago', 'Payment status from order ' . $order->get_order_number() . ': ' . $data->status );
|
492 |
+
|
493 |
+
switch ( $data->status ) {
|
494 |
+
case 'approved':
|
495 |
+
|
496 |
+
// Order details.
|
497 |
+
if ( ! empty( $data->id ) ) {
|
498 |
+
update_post_meta(
|
499 |
+
$order_id,
|
500 |
+
__( 'MercadoPago Transaction ID', 'wcmercadopago' ),
|
501 |
+
$data->id
|
502 |
+
);
|
503 |
+
}
|
504 |
+
if ( ! empty( $data->payer->email ) ) {
|
505 |
+
update_post_meta(
|
506 |
+
$order_id,
|
507 |
+
__( 'Payer email', 'wcmercadopago' ),
|
508 |
+
$data->payer->email
|
509 |
+
);
|
510 |
+
}
|
511 |
+
if ( ! empty( $data->payment_type ) ) {
|
512 |
+
update_post_meta(
|
513 |
+
$order_id,
|
514 |
+
__( 'Payment type', 'wcmercadopago' ),
|
515 |
+
$data->payment_type
|
516 |
+
);
|
517 |
+
}
|
518 |
+
|
519 |
+
// Payment completed.
|
520 |
+
$order->add_order_note( __( 'The payment was approved by MercadoPago.', 'wcmercadopago' ) );
|
521 |
+
$order->payment_complete();
|
522 |
+
|
523 |
+
break;
|
524 |
+
case 'pending':
|
525 |
+
$order->add_order_note( __( 'The user has not completed the payment process yet.', 'wcmercadopago' ) );
|
526 |
+
|
527 |
+
break;
|
528 |
+
case 'in_process':
|
529 |
+
$order->update_status( 'on-hold', __( 'Payment under review by MercadoPago.', 'wcmercadopago' ) );
|
530 |
+
|
531 |
+
break;
|
532 |
+
case 'rejected':
|
533 |
+
$order->add_order_note( __( 'The payment was declined. The user can try again.', 'wcmercadopago' ) );
|
534 |
+
|
535 |
+
break;
|
536 |
+
case 'refunded':
|
537 |
+
$order->update_status( 'refunded', __( 'The payment was returned to the user.', 'wcmercadopago' ) );
|
538 |
+
|
539 |
+
break;
|
540 |
+
case 'cancelled':
|
541 |
+
$order->update_status( 'cancelled', __( 'Payment canceled by MercadoPago.', 'wcmercadopago' ) );
|
542 |
+
|
543 |
+
break;
|
544 |
+
case 'in_mediation':
|
545 |
+
$order->add_order_note( __( 'It started a dispute for payment.', 'wcmercadopago' ) );
|
546 |
+
|
547 |
+
break;
|
548 |
+
|
549 |
+
default:
|
550 |
+
// No action xD.
|
551 |
+
break;
|
552 |
+
}
|
553 |
+
}
|
554 |
+
}
|
555 |
+
}
|
556 |
+
|
557 |
+
/**
|
558 |
+
* Adds error message when not configured the client_id.
|
559 |
+
*
|
560 |
+
* @return string Error Mensage.
|
561 |
+
*/
|
562 |
+
public function client_id_missing_message() {
|
563 |
+
echo '<div class="error"><p>' . sprintf( __( '<strong>Gateway Disabled</strong> You should inform your Client_id in MercadoPago. %sClick here to configure!%s', 'wcmercadopago' ), '<a href="' . admin_url( 'admin.php?page=woocommerce_settings&tab=payment_gateways§ion=WC_MercadoPago_Gateway' ) . '">', '</a>' ) . '</p></div>';
|
564 |
+
}
|
565 |
+
|
566 |
+
/**
|
567 |
+
* Adds error message when not configured the client_secret.
|
568 |
+
*
|
569 |
+
* @return string Error Mensage.
|
570 |
+
*/
|
571 |
+
public function client_secret_missing_message() {
|
572 |
+
echo '<div class="error"><p>' . sprintf( __( '<strong>Gateway Disabled</strong> You should inform your Client_secret in MercadoPago. %sClick here to configure!%s', 'wcmercadopago' ), '<a href="' . admin_url( 'admin.php?page=woocommerce_settings&tab=payment_gateways§ion=WC_MercadoPago_Gateway' ) . '">', '</a>' ) . '</p></div>';
|
573 |
+
}
|
574 |
+
}
|
images/mercadopago.png
ADDED
Binary file
|
languages/wcmercadopago-es_AR.mo
ADDED
Binary file
|
languages/wcmercadopago-es_AR.po
ADDED
@@ -0,0 +1,337 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WooCommerce MercadoPago v1.5.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2013-07-26 04:58:55+0000\n"
|
7 |
+
"Last-Translator: Gustavo Coronel <gcoronel@gmail.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Generator: CSL v1.x\n"
|
14 |
+
"X-Poedit-Language: Spanish\n"
|
15 |
+
"X-Poedit-Country: ARGENTINE\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
+
"X-Poedit-Basepath: ../\n"
|
19 |
+
"X-Poedit-Bookmarks: \n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Textdomain-Support: yes"
|
22 |
+
|
23 |
+
#. translators: plugin header field 'Name'
|
24 |
+
#: wc-mercadopago.php:0
|
25 |
+
#@ wcmercadopago
|
26 |
+
msgid "WooCommerce MercadoPago"
|
27 |
+
msgstr "WooCommerce MercadoPago"
|
28 |
+
|
29 |
+
#. translators: plugin header field 'Description'
|
30 |
+
#: wc-mercadopago.php:0
|
31 |
+
#@ wcmercadopago
|
32 |
+
msgid "Gateway de pagamento MercadoPago para WooCommerce."
|
33 |
+
msgstr "Gateway de pagamento MercadoPago para WooCommerce."
|
34 |
+
|
35 |
+
#. translators: plugin header field 'Author'
|
36 |
+
#: wc-mercadopago.php:0
|
37 |
+
#@ wcmercadopago
|
38 |
+
msgid "claudiosanches"
|
39 |
+
msgstr "claudiosanches"
|
40 |
+
|
41 |
+
#: class-wc-mercadopago-gateway.php:21
|
42 |
+
#: class-wc-mercadopago-gateway.php:117
|
43 |
+
#@ wcmercadopago
|
44 |
+
msgid "MercadoPago"
|
45 |
+
msgstr "MercadoPago"
|
46 |
+
|
47 |
+
#: class-wc-mercadopago-gateway.php:88
|
48 |
+
#@ wcmercadopago
|
49 |
+
msgid "MercadoPago standard"
|
50 |
+
msgstr "MercadoPago estándar"
|
51 |
+
|
52 |
+
#: class-wc-mercadopago-gateway.php:89
|
53 |
+
#@ wcmercadopago
|
54 |
+
msgid "MercadoPago standard works by sending the user to MercadoPago to enter their payment information."
|
55 |
+
msgstr "MercadoPago estándar funciona enviando al usuario, hacia el sitio MercadoPago, donde se hará el pago."
|
56 |
+
|
57 |
+
#: class-wc-mercadopago-gateway.php:107
|
58 |
+
#@ wcmercadopago
|
59 |
+
msgid "Enable/Disable"
|
60 |
+
msgstr "Habilita/Desabilita"
|
61 |
+
|
62 |
+
#: class-wc-mercadopago-gateway.php:109
|
63 |
+
#@ wcmercadopago
|
64 |
+
msgid "Enable MercadoPago standard"
|
65 |
+
msgstr "Habilitar MercadoPago como estándar"
|
66 |
+
|
67 |
+
#: class-wc-mercadopago-gateway.php:113
|
68 |
+
#@ wcmercadopago
|
69 |
+
msgid "Title"
|
70 |
+
msgstr "Título"
|
71 |
+
|
72 |
+
#: class-wc-mercadopago-gateway.php:115
|
73 |
+
#@ wcmercadopago
|
74 |
+
msgid "This controls the title which the user sees during checkout."
|
75 |
+
msgstr "Controla el título que el usuario ve durante la comprobación."
|
76 |
+
|
77 |
+
#: class-wc-mercadopago-gateway.php:120
|
78 |
+
#@ wcmercadopago
|
79 |
+
msgid "Description"
|
80 |
+
msgstr "Descripción"
|
81 |
+
|
82 |
+
#: class-wc-mercadopago-gateway.php:122
|
83 |
+
#@ wcmercadopago
|
84 |
+
msgid "This controls the description which the user sees during checkout."
|
85 |
+
msgstr "Esto controla la descripción que el usuario ve durante la comprobación / checkout."
|
86 |
+
|
87 |
+
#: class-wc-mercadopago-gateway.php:123
|
88 |
+
#: class-wc-mercadopago-gateway.php:289
|
89 |
+
#@ wcmercadopago
|
90 |
+
msgid "Pay via MercadoPago"
|
91 |
+
msgstr "Pagar con MercadoPago"
|
92 |
+
|
93 |
+
#: class-wc-mercadopago-gateway.php:126
|
94 |
+
#@ wcmercadopago
|
95 |
+
msgid "MercadoPago Client_id"
|
96 |
+
msgstr "Client_id de MercadoPago"
|
97 |
+
|
98 |
+
#: class-wc-mercadopago-gateway.php:128
|
99 |
+
#@ wcmercadopago
|
100 |
+
msgid "Please enter your MercadoPago Client_id."
|
101 |
+
msgstr "Introduzca su client_id de MercadoPago."
|
102 |
+
|
103 |
+
#: class-wc-mercadopago-gateway.php:132
|
104 |
+
#@ wcmercadopago
|
105 |
+
msgid "MercadoPago Client_secret"
|
106 |
+
msgstr "Client_secret de MercadoPago"
|
107 |
+
|
108 |
+
#: class-wc-mercadopago-gateway.php:134
|
109 |
+
#@ wcmercadopago
|
110 |
+
msgid "Please enter your MercadoPago Client_secret."
|
111 |
+
msgstr "Introduzca Client_secret de MercadoPago."
|
112 |
+
|
113 |
+
#: class-wc-mercadopago-gateway.php:138
|
114 |
+
#@ wcmercadopago
|
115 |
+
msgid "Invoice Prefix"
|
116 |
+
msgstr "Prefijo factura"
|
117 |
+
|
118 |
+
#: class-wc-mercadopago-gateway.php:140
|
119 |
+
#@ wcmercadopago
|
120 |
+
msgid "Please enter a prefix for your invoice numbers. If you use your MercadoPago account for multiple stores ensure this prefix is unqiue as MercadoPago will not allow orders with the same invoice number."
|
121 |
+
msgstr "Por favor, introduzca un prefijo para los números de factura. Si usted utiliza su cuenta MercadoPago para múltiples tiendas asegurar este prefijo es unico, MercadoPago no permitirá que las órdenes con el mismo número de factura."
|
122 |
+
|
123 |
+
#: class-wc-mercadopago-gateway.php:218
|
124 |
+
#, php-format
|
125 |
+
#@ wcmercadopago
|
126 |
+
msgid "Order %s"
|
127 |
+
msgstr "Pedido %s"
|
128 |
+
|
129 |
+
#: class-wc-mercadopago-gateway.php:222
|
130 |
+
#@ wcmercadopago
|
131 |
+
msgid "Shipping via"
|
132 |
+
msgstr "Entrega via"
|
133 |
+
|
134 |
+
#: class-wc-mercadopago-gateway.php:287
|
135 |
+
#@ wcmercadopago
|
136 |
+
msgid "Thank you for your order, please click the button below to pay with MercadoPago."
|
137 |
+
msgstr "Gracias por su pedido, por favor haga clic en el botón de abajo para pagar con MercadoPago."
|
138 |
+
|
139 |
+
#: class-wc-mercadopago-gateway.php:289
|
140 |
+
#@ wcmercadopago
|
141 |
+
msgid "Cancel order & restore cart"
|
142 |
+
msgstr "Cancelar pedido y restaurar el carro de compras"
|
143 |
+
|
144 |
+
#: class-wc-mercadopago-gateway.php:297
|
145 |
+
#@ wcmercadopago
|
146 |
+
msgid "An error has occurred while processing your payment, please try again. Or contact us for assistance."
|
147 |
+
msgstr "Se produjo un error al procesar su pago, por favor inténtelo de nuevo o póngase en contacto para obtener ayuda."
|
148 |
+
|
149 |
+
#: class-wc-mercadopago-gateway.php:299
|
150 |
+
#@ wcmercadopago
|
151 |
+
msgid "Click to try again"
|
152 |
+
msgstr "Haga clic para volver a intentarlo"
|
153 |
+
|
154 |
+
#: class-wc-mercadopago-gateway.php:500
|
155 |
+
#@ wcmercadopago
|
156 |
+
msgid "MercadoPago Transaction ID"
|
157 |
+
msgstr "MercadoPago: ID de la transacción"
|
158 |
+
|
159 |
+
#: class-wc-mercadopago-gateway.php:507
|
160 |
+
#@ wcmercadopago
|
161 |
+
msgid "Payer email"
|
162 |
+
msgstr "Correo electrónico del comprador"
|
163 |
+
|
164 |
+
#: class-wc-mercadopago-gateway.php:514
|
165 |
+
#@ wcmercadopago
|
166 |
+
msgid "Payment type"
|
167 |
+
msgstr "Forma de pago"
|
168 |
+
|
169 |
+
#: class-wc-mercadopago-gateway.php:520
|
170 |
+
#@ wcmercadopago
|
171 |
+
msgid "The payment was approved by MercadoPago."
|
172 |
+
msgstr "El pago fue aprobado por MercadoPago."
|
173 |
+
|
174 |
+
#: class-wc-mercadopago-gateway.php:525
|
175 |
+
#@ wcmercadopago
|
176 |
+
msgid "The user has not completed the payment process yet."
|
177 |
+
msgstr "El usuario no ha completado el proceso de pago todavía."
|
178 |
+
|
179 |
+
#: class-wc-mercadopago-gateway.php:529
|
180 |
+
#@ wcmercadopago
|
181 |
+
msgid "Payment under review by MercadoPago."
|
182 |
+
msgstr "Pago en revisión por MercadoPago."
|
183 |
+
|
184 |
+
#: class-wc-mercadopago-gateway.php:533
|
185 |
+
#@ wcmercadopago
|
186 |
+
msgid "The payment was declined. The user can try again."
|
187 |
+
msgstr "El pago fue rechazado. El usuario puede volver a intentarlo."
|
188 |
+
|
189 |
+
#: class-wc-mercadopago-gateway.php:537
|
190 |
+
#@ wcmercadopago
|
191 |
+
msgid "The payment was returned to the user."
|
192 |
+
msgstr "El pago se devuelve al usuario."
|
193 |
+
|
194 |
+
#: class-wc-mercadopago-gateway.php:541
|
195 |
+
#@ wcmercadopago
|
196 |
+
msgid "Payment canceled by MercadoPago."
|
197 |
+
msgstr "Pago cancelado por MercadoPago."
|
198 |
+
|
199 |
+
#: class-wc-mercadopago-gateway.php:545
|
200 |
+
#@ wcmercadopago
|
201 |
+
msgid "It started a dispute for payment."
|
202 |
+
msgstr "Se inició una disputa por el pago."
|
203 |
+
|
204 |
+
#: class-wc-mercadopago-gateway.php:563
|
205 |
+
#, php-format
|
206 |
+
#@ wcmercadopago
|
207 |
+
msgid "<strong>Gateway Disabled</strong> You should inform your Client_id in MercadoPago. %sClick here to configure!%s"
|
208 |
+
msgstr "<strong>Forma de pago deshabilitado</strong> Debe informar a su client_id de MercadoPago. %sHaga clic aquí para configurar!%s"
|
209 |
+
|
210 |
+
#: class-wc-mercadopago-gateway.php:572
|
211 |
+
#, php-format
|
212 |
+
#@ wcmercadopago
|
213 |
+
msgid "<strong>Gateway Disabled</strong> You should inform your Client_secret in MercadoPago. %sClick here to configure!%s"
|
214 |
+
msgstr "<strong>Forma de pago deshabilitado</strong> Debe informar su Client_secret de MercadoPago. %sHaga clic aquí para configurar!%s"
|
215 |
+
|
216 |
+
#: class-wc-mercadopago-gateway.php:156
|
217 |
+
#@ wcmercadopago
|
218 |
+
msgid "Gateway Testing"
|
219 |
+
msgstr "Test de Gateway"
|
220 |
+
|
221 |
+
#: class-wc-mercadopago-gateway.php:168
|
222 |
+
#@ wcmercadopago
|
223 |
+
msgid "Debug Log"
|
224 |
+
msgstr "Log de depuración"
|
225 |
+
|
226 |
+
#: class-wc-mercadopago-gateway.php:170
|
227 |
+
#@ wcmercadopago
|
228 |
+
msgid "Enable logging"
|
229 |
+
msgstr "Habilitar log"
|
230 |
+
|
231 |
+
#: class-wc-mercadopago-gateway.php:463
|
232 |
+
#@ wcmercadopago
|
233 |
+
msgid "MercadoPago Request Failure"
|
234 |
+
msgstr "MercadoPago falta de solicitud"
|
235 |
+
|
236 |
+
#: class-wc-mercadopago-gateway.php:103
|
237 |
+
#@ wcmercadopago
|
238 |
+
msgid "Argentine"
|
239 |
+
msgstr "Argentina"
|
240 |
+
|
241 |
+
#: class-wc-mercadopago-gateway.php:103
|
242 |
+
#@ wcmercadopago
|
243 |
+
msgid "Brazil"
|
244 |
+
msgstr "Brasil"
|
245 |
+
|
246 |
+
#: class-wc-mercadopago-gateway.php:103
|
247 |
+
#@ wcmercadopago
|
248 |
+
msgid "Mexico"
|
249 |
+
msgstr "México"
|
250 |
+
|
251 |
+
#: class-wc-mercadopago-gateway.php:103
|
252 |
+
#@ wcmercadopago
|
253 |
+
msgid "Venezuela"
|
254 |
+
msgstr "Venezuela"
|
255 |
+
|
256 |
+
#: class-wc-mercadopago-gateway.php:103
|
257 |
+
#@ wcmercadopago
|
258 |
+
msgid "or"
|
259 |
+
msgstr "o"
|
260 |
+
|
261 |
+
#: class-wc-mercadopago-gateway.php:128
|
262 |
+
#: class-wc-mercadopago-gateway.php:134
|
263 |
+
#, php-format
|
264 |
+
#@ wcmercadopago
|
265 |
+
msgid "You can to get this information in MercadoPago from %s."
|
266 |
+
msgstr "Usted puede obtener esta información en la MercadoPago de %s"
|
267 |
+
|
268 |
+
#: class-wc-mercadopago-gateway.php:145
|
269 |
+
#@ wcmercadopago
|
270 |
+
msgid "Integration method"
|
271 |
+
msgstr "Método de integración"
|
272 |
+
|
273 |
+
#: class-wc-mercadopago-gateway.php:151
|
274 |
+
#@ wcmercadopago
|
275 |
+
msgid "Modal Window"
|
276 |
+
msgstr "Ventana Modal"
|
277 |
+
|
278 |
+
#: class-wc-mercadopago-gateway.php:152
|
279 |
+
#@ wcmercadopago
|
280 |
+
msgid "Redirect"
|
281 |
+
msgstr "Redireccionar"
|
282 |
+
|
283 |
+
#: class-wc-mercadopago-gateway.php:161
|
284 |
+
#@ wcmercadopago
|
285 |
+
msgid "MercadoPago Sandbox"
|
286 |
+
msgstr "MercadoPago Sandbox"
|
287 |
+
|
288 |
+
#: class-wc-mercadopago-gateway.php:163
|
289 |
+
#@ wcmercadopago
|
290 |
+
msgid "Enable MercadoPago sandbox"
|
291 |
+
msgstr "Habilitar MercadoPago sandbox"
|
292 |
+
|
293 |
+
#: class-wc-mercadopago-gateway.php:165
|
294 |
+
#@ wcmercadopago
|
295 |
+
msgid "MercadoPago sandbox can be used to test payments."
|
296 |
+
msgstr "MercadoPago sandbox puede ser utilizado para probar los pagos."
|
297 |
+
|
298 |
+
#: class-wc-mercadopago-gateway.php:172
|
299 |
+
#, php-format
|
300 |
+
#@ wcmercadopago
|
301 |
+
msgid "Log MercadoPago events, such as API requests, inside %s"
|
302 |
+
msgstr "Registrar los eventos MercadoPago, tales como solicitudes de la API, de% s"
|
303 |
+
|
304 |
+
#. translators: plugin header field 'PluginURI'
|
305 |
+
#: wc-mercadopago.php:0
|
306 |
+
#@ wcmercadopago
|
307 |
+
msgid "https://github.com/claudiosmweb/woocommerce-mercadopago"
|
308 |
+
msgstr "https://github.com/claudiosmweb/woocommerce-mercadopago"
|
309 |
+
|
310 |
+
#. translators: plugin header field 'AuthorURI'
|
311 |
+
#: wc-mercadopago.php:0
|
312 |
+
#@ wcmercadopago
|
313 |
+
msgid "http://claudiosmweb.com/"
|
314 |
+
msgstr "http://claudiosmweb.com/"
|
315 |
+
|
316 |
+
#: wc-mercadopago.php:18
|
317 |
+
#, php-format
|
318 |
+
#@ wcmercadopago
|
319 |
+
msgid "WooCommerce MercadoPago Gateway depends on the last version of %s to work!"
|
320 |
+
msgstr "WooCommerce MercadoPago gateway depende de la última versión de %s para trabajar!"
|
321 |
+
|
322 |
+
#: wc-mercadopago.php:89
|
323 |
+
#@ wcmercadopago
|
324 |
+
msgid "Settings"
|
325 |
+
msgstr "Configuración"
|
326 |
+
|
327 |
+
#: class-wc-mercadopago-gateway.php:147
|
328 |
+
#@ wcmercadopago
|
329 |
+
msgid "Choose how the customer will interact with the MercadoPago. Modal Window (Inside your store) Redirect (Client goes to MercadoPago)."
|
330 |
+
msgstr "Elige cómo el cliente va a interactuar con la MercadoPago. Ventana Modal (Dentro de su tienda) Redireccionar (Client va a MercadoPago)."
|
331 |
+
|
332 |
+
#. translators: plugin header field 'Version'
|
333 |
+
#: wc-mercadopago.php:0
|
334 |
+
#@ wcmercadopago
|
335 |
+
msgid "1.5.0"
|
336 |
+
msgstr "1.5.0"
|
337 |
+
|
languages/wcmercadopago-es_ES.mo
ADDED
Binary file
|
languages/wcmercadopago-es_ES.po
ADDED
@@ -0,0 +1,337 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WooCommerce MercadoPago v1.5.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2013-07-26 04:58:39+0000\n"
|
7 |
+
"Last-Translator: Marcelo Pedra <marcelo@marcelopedra.com.ar>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Generator: Poedit 1.5.7\n"
|
14 |
+
"X-Poedit-Language: \n"
|
15 |
+
"X-Poedit-Country: \n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
+
"X-Poedit-Basepath: ../\n"
|
19 |
+
"X-Poedit-Bookmarks: \n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Textdomain-Support: yes"
|
22 |
+
|
23 |
+
#. translators: plugin header field 'Name'
|
24 |
+
#: wc-mercadopago.php:0
|
25 |
+
#@ wcmercadopago
|
26 |
+
msgid "WooCommerce MercadoPago"
|
27 |
+
msgstr "MercadoPago para WooCommerce"
|
28 |
+
|
29 |
+
#. translators: plugin header field 'Description'
|
30 |
+
#: wc-mercadopago.php:0
|
31 |
+
#@ wcmercadopago
|
32 |
+
msgid "Gateway de pagamento MercadoPago para WooCommerce."
|
33 |
+
msgstr "Gateway de MercadoPago para WooCommerce."
|
34 |
+
|
35 |
+
#. translators: plugin header field 'Author'
|
36 |
+
#: wc-mercadopago.php:0
|
37 |
+
#@ wcmercadopago
|
38 |
+
msgid "claudiosanches"
|
39 |
+
msgstr "claudiosanches"
|
40 |
+
|
41 |
+
#: class-wc-mercadopago-gateway.php:21
|
42 |
+
#: class-wc-mercadopago-gateway.php:117
|
43 |
+
#@ wcmercadopago
|
44 |
+
msgid "MercadoPago"
|
45 |
+
msgstr "MercadoPago"
|
46 |
+
|
47 |
+
#: class-wc-mercadopago-gateway.php:88
|
48 |
+
#@ wcmercadopago
|
49 |
+
msgid "MercadoPago standard"
|
50 |
+
msgstr "MercadoPago estándar"
|
51 |
+
|
52 |
+
#: class-wc-mercadopago-gateway.php:89
|
53 |
+
#@ wcmercadopago
|
54 |
+
msgid "MercadoPago standard works by sending the user to MercadoPago to enter their payment information."
|
55 |
+
msgstr "MercadoPago estándar funciona enviando al usuario hacia el sitio MercadoPago, donde hará el pago."
|
56 |
+
|
57 |
+
#: class-wc-mercadopago-gateway.php:107
|
58 |
+
#@ wcmercadopago
|
59 |
+
msgid "Enable/Disable"
|
60 |
+
msgstr "Habilita/Deshabilita"
|
61 |
+
|
62 |
+
#: class-wc-mercadopago-gateway.php:109
|
63 |
+
#@ wcmercadopago
|
64 |
+
msgid "Enable MercadoPago standard"
|
65 |
+
msgstr "Habilitar MercadoPago"
|
66 |
+
|
67 |
+
#: class-wc-mercadopago-gateway.php:113
|
68 |
+
#@ wcmercadopago
|
69 |
+
msgid "Title"
|
70 |
+
msgstr "Título"
|
71 |
+
|
72 |
+
#: class-wc-mercadopago-gateway.php:115
|
73 |
+
#@ wcmercadopago
|
74 |
+
msgid "This controls the title which the user sees during checkout."
|
75 |
+
msgstr "Esto controla el título que el usuario ve durante el proceso de compra."
|
76 |
+
|
77 |
+
#: class-wc-mercadopago-gateway.php:120
|
78 |
+
#@ wcmercadopago
|
79 |
+
msgid "Description"
|
80 |
+
msgstr "Descripción"
|
81 |
+
|
82 |
+
#: class-wc-mercadopago-gateway.php:122
|
83 |
+
#@ wcmercadopago
|
84 |
+
msgid "This controls the description which the user sees during checkout."
|
85 |
+
msgstr "Esto controla la descripción que el usuario ve durante el proceso de compra."
|
86 |
+
|
87 |
+
#: class-wc-mercadopago-gateway.php:123
|
88 |
+
#: class-wc-mercadopago-gateway.php:289
|
89 |
+
#@ wcmercadopago
|
90 |
+
msgid "Pay via MercadoPago"
|
91 |
+
msgstr "Pagar con MercadoPago"
|
92 |
+
|
93 |
+
#: class-wc-mercadopago-gateway.php:126
|
94 |
+
#@ wcmercadopago
|
95 |
+
msgid "MercadoPago Client_id"
|
96 |
+
msgstr "Client_id de MercadoPago"
|
97 |
+
|
98 |
+
#: class-wc-mercadopago-gateway.php:128
|
99 |
+
#@ wcmercadopago
|
100 |
+
msgid "Please enter your MercadoPago Client_id."
|
101 |
+
msgstr "Introduzca su Client_id de MercadoPago."
|
102 |
+
|
103 |
+
#: class-wc-mercadopago-gateway.php:132
|
104 |
+
#@ wcmercadopago
|
105 |
+
msgid "MercadoPago Client_secret"
|
106 |
+
msgstr "Client_secret de MercadoPago"
|
107 |
+
|
108 |
+
#: class-wc-mercadopago-gateway.php:134
|
109 |
+
#@ wcmercadopago
|
110 |
+
msgid "Please enter your MercadoPago Client_secret."
|
111 |
+
msgstr "Introduzca su Client_secret de MercadoPago."
|
112 |
+
|
113 |
+
#: class-wc-mercadopago-gateway.php:138
|
114 |
+
#@ wcmercadopago
|
115 |
+
msgid "Invoice Prefix"
|
116 |
+
msgstr "Prefijo de las facturas"
|
117 |
+
|
118 |
+
#: class-wc-mercadopago-gateway.php:140
|
119 |
+
#@ wcmercadopago
|
120 |
+
msgid "Please enter a prefix for your invoice numbers. If you use your MercadoPago account for multiple stores ensure this prefix is unqiue as MercadoPago will not allow orders with the same invoice number."
|
121 |
+
msgstr "Por favor, introduzca un prefijo para los números de factura. Si usted utiliza su cuenta de MercadoPago para múltiples tiendas, asegúrese de que este prefijo sea único, ya que MercadoPago no permitirá pedidos con el mismo número de factura."
|
122 |
+
|
123 |
+
#: class-wc-mercadopago-gateway.php:218
|
124 |
+
#, php-format
|
125 |
+
#@ wcmercadopago
|
126 |
+
msgid "Order %s"
|
127 |
+
msgstr "Pedido %s"
|
128 |
+
|
129 |
+
#: class-wc-mercadopago-gateway.php:222
|
130 |
+
#@ wcmercadopago
|
131 |
+
msgid "Shipping via"
|
132 |
+
msgstr "Entrega via"
|
133 |
+
|
134 |
+
#: class-wc-mercadopago-gateway.php:287
|
135 |
+
#@ wcmercadopago
|
136 |
+
msgid "Thank you for your order, please click the button below to pay with MercadoPago."
|
137 |
+
msgstr "Gracias por su pedido, por favor haga clic en el siguiente botón para pagar con MercadoPago."
|
138 |
+
|
139 |
+
#: class-wc-mercadopago-gateway.php:289
|
140 |
+
#@ wcmercadopago
|
141 |
+
msgid "Cancel order & restore cart"
|
142 |
+
msgstr "Cancelar pedido y restaurar el carro de compras"
|
143 |
+
|
144 |
+
#: class-wc-mercadopago-gateway.php:297
|
145 |
+
#@ wcmercadopago
|
146 |
+
msgid "An error has occurred while processing your payment, please try again. Or contact us for assistance."
|
147 |
+
msgstr "Se produjo un error al procesar su pago, por favor inténtelo de nuevo o póngase en contacto para obtener ayuda."
|
148 |
+
|
149 |
+
#: class-wc-mercadopago-gateway.php:299
|
150 |
+
#@ wcmercadopago
|
151 |
+
msgid "Click to try again"
|
152 |
+
msgstr "Haga clic para volver a intentarlo"
|
153 |
+
|
154 |
+
#: class-wc-mercadopago-gateway.php:500
|
155 |
+
#@ wcmercadopago
|
156 |
+
msgid "MercadoPago Transaction ID"
|
157 |
+
msgstr "MercadoPago: ID de la transacción"
|
158 |
+
|
159 |
+
#: class-wc-mercadopago-gateway.php:507
|
160 |
+
#@ wcmercadopago
|
161 |
+
msgid "Payer email"
|
162 |
+
msgstr "Email del comprador"
|
163 |
+
|
164 |
+
#: class-wc-mercadopago-gateway.php:514
|
165 |
+
#@ wcmercadopago
|
166 |
+
msgid "Payment type"
|
167 |
+
msgstr "Forma de pago"
|
168 |
+
|
169 |
+
#: class-wc-mercadopago-gateway.php:520
|
170 |
+
#@ wcmercadopago
|
171 |
+
msgid "The payment was approved by MercadoPago."
|
172 |
+
msgstr "El pago fue aprobado por MercadoPago."
|
173 |
+
|
174 |
+
#: class-wc-mercadopago-gateway.php:525
|
175 |
+
#@ wcmercadopago
|
176 |
+
msgid "The user has not completed the payment process yet."
|
177 |
+
msgstr "El usuario no ha completado el proceso de pago todavía."
|
178 |
+
|
179 |
+
#: class-wc-mercadopago-gateway.php:529
|
180 |
+
#@ wcmercadopago
|
181 |
+
msgid "Payment under review by MercadoPago."
|
182 |
+
msgstr "Pago en revisión por MercadoPago."
|
183 |
+
|
184 |
+
#: class-wc-mercadopago-gateway.php:533
|
185 |
+
#@ wcmercadopago
|
186 |
+
msgid "The payment was declined. The user can try again."
|
187 |
+
msgstr "El pago fue rechazado. El usuario puede volver a intentarlo."
|
188 |
+
|
189 |
+
#: class-wc-mercadopago-gateway.php:537
|
190 |
+
#@ wcmercadopago
|
191 |
+
msgid "The payment was returned to the user."
|
192 |
+
msgstr "El pago se devolvió al usuario."
|
193 |
+
|
194 |
+
#: class-wc-mercadopago-gateway.php:541
|
195 |
+
#@ wcmercadopago
|
196 |
+
msgid "Payment canceled by MercadoPago."
|
197 |
+
msgstr "Pago cancelado por MercadoPago."
|
198 |
+
|
199 |
+
#: class-wc-mercadopago-gateway.php:545
|
200 |
+
#@ wcmercadopago
|
201 |
+
msgid "It started a dispute for payment."
|
202 |
+
msgstr "Se inició una disputa por el pago."
|
203 |
+
|
204 |
+
#: class-wc-mercadopago-gateway.php:563
|
205 |
+
#, php-format
|
206 |
+
#@ wcmercadopago
|
207 |
+
msgid "<strong>Gateway Disabled</strong> You should inform your Client_id in MercadoPago. %sClick here to configure!%s"
|
208 |
+
msgstr "<strong>Forma de pago deshabilitada</strong> Debe informar su Client_id de MercadoPago. %sHaga clic aquí para configurar!%s"
|
209 |
+
|
210 |
+
#: class-wc-mercadopago-gateway.php:572
|
211 |
+
#, php-format
|
212 |
+
#@ wcmercadopago
|
213 |
+
msgid "<strong>Gateway Disabled</strong> You should inform your Client_secret in MercadoPago. %sClick here to configure!%s"
|
214 |
+
msgstr "<strong>Forma de pago deshabilitada</strong> Debe informar su Client_secret de MercadoPago. %sHaga clic aquí para configurar!%s"
|
215 |
+
|
216 |
+
#: class-wc-mercadopago-gateway.php:156
|
217 |
+
#@ wcmercadopago
|
218 |
+
msgid "Gateway Testing"
|
219 |
+
msgstr "Test de Gateway"
|
220 |
+
|
221 |
+
#: class-wc-mercadopago-gateway.php:168
|
222 |
+
#@ wcmercadopago
|
223 |
+
msgid "Debug Log"
|
224 |
+
msgstr "Log de depuración"
|
225 |
+
|
226 |
+
#: class-wc-mercadopago-gateway.php:170
|
227 |
+
#@ wcmercadopago
|
228 |
+
msgid "Enable logging"
|
229 |
+
msgstr "Habilitar log"
|
230 |
+
|
231 |
+
#: class-wc-mercadopago-gateway.php:463
|
232 |
+
#@ wcmercadopago
|
233 |
+
msgid "MercadoPago Request Failure"
|
234 |
+
msgstr "Falta de Solicitud a MercadoPago"
|
235 |
+
|
236 |
+
#: class-wc-mercadopago-gateway.php:103
|
237 |
+
#@ wcmercadopago
|
238 |
+
msgid "Argentine"
|
239 |
+
msgstr "Argentina"
|
240 |
+
|
241 |
+
#: class-wc-mercadopago-gateway.php:103
|
242 |
+
#@ wcmercadopago
|
243 |
+
msgid "Brazil"
|
244 |
+
msgstr "Brasil"
|
245 |
+
|
246 |
+
#: class-wc-mercadopago-gateway.php:103
|
247 |
+
#@ wcmercadopago
|
248 |
+
msgid "Mexico"
|
249 |
+
msgstr "México"
|
250 |
+
|
251 |
+
#: class-wc-mercadopago-gateway.php:103
|
252 |
+
#@ wcmercadopago
|
253 |
+
msgid "Venezuela"
|
254 |
+
msgstr "Venezuela"
|
255 |
+
|
256 |
+
#: class-wc-mercadopago-gateway.php:103
|
257 |
+
#@ wcmercadopago
|
258 |
+
msgid "or"
|
259 |
+
msgstr "o"
|
260 |
+
|
261 |
+
#: class-wc-mercadopago-gateway.php:128
|
262 |
+
#: class-wc-mercadopago-gateway.php:134
|
263 |
+
#, php-format
|
264 |
+
#@ wcmercadopago
|
265 |
+
msgid "You can to get this information in MercadoPago from %s."
|
266 |
+
msgstr "Usted puede obtener esta información en MercadoPago de %s"
|
267 |
+
|
268 |
+
#: class-wc-mercadopago-gateway.php:145
|
269 |
+
#@ wcmercadopago
|
270 |
+
msgid "Integration method"
|
271 |
+
msgstr "Método de integración"
|
272 |
+
|
273 |
+
#: class-wc-mercadopago-gateway.php:151
|
274 |
+
#@ wcmercadopago
|
275 |
+
msgid "Modal Window"
|
276 |
+
msgstr "Ventana Modal"
|
277 |
+
|
278 |
+
#: class-wc-mercadopago-gateway.php:152
|
279 |
+
#@ wcmercadopago
|
280 |
+
msgid "Redirect"
|
281 |
+
msgstr "Redireccionar"
|
282 |
+
|
283 |
+
#: class-wc-mercadopago-gateway.php:161
|
284 |
+
#@ wcmercadopago
|
285 |
+
msgid "MercadoPago Sandbox"
|
286 |
+
msgstr "Sandbox de MercadoPago"
|
287 |
+
|
288 |
+
#: class-wc-mercadopago-gateway.php:163
|
289 |
+
#@ wcmercadopago
|
290 |
+
msgid "Enable MercadoPago sandbox"
|
291 |
+
msgstr "Habilitar sandbox de MercadoPago"
|
292 |
+
|
293 |
+
#: class-wc-mercadopago-gateway.php:165
|
294 |
+
#@ wcmercadopago
|
295 |
+
msgid "MercadoPago sandbox can be used to test payments."
|
296 |
+
msgstr "La sandbox de MercadoPago puede utilizarse para probar los pagos."
|
297 |
+
|
298 |
+
#: class-wc-mercadopago-gateway.php:172
|
299 |
+
#, php-format
|
300 |
+
#@ wcmercadopago
|
301 |
+
msgid "Log MercadoPago events, such as API requests, inside %s"
|
302 |
+
msgstr "Registrar los eventos de MercadoPago, tales como solicitudes de la API, en %s"
|
303 |
+
|
304 |
+
#. translators: plugin header field 'PluginURI'
|
305 |
+
#: wc-mercadopago.php:0
|
306 |
+
#@ wcmercadopago
|
307 |
+
msgid "https://github.com/claudiosmweb/woocommerce-mercadopago"
|
308 |
+
msgstr "https://github.com/claudiosmweb/woocommerce-mercadopago"
|
309 |
+
|
310 |
+
#. translators: plugin header field 'AuthorURI'
|
311 |
+
#: wc-mercadopago.php:0
|
312 |
+
#@ wcmercadopago
|
313 |
+
msgid "http://claudiosmweb.com/"
|
314 |
+
msgstr "http://claudiosmweb.com/"
|
315 |
+
|
316 |
+
#: wc-mercadopago.php:18
|
317 |
+
#, php-format
|
318 |
+
#@ wcmercadopago
|
319 |
+
msgid "WooCommerce MercadoPago Gateway depends on the last version of %s to work!"
|
320 |
+
msgstr "MercadoPago para WooCommerce depende de la última versión de %s para funcionar!"
|
321 |
+
|
322 |
+
#: wc-mercadopago.php:89
|
323 |
+
#@ wcmercadopago
|
324 |
+
msgid "Settings"
|
325 |
+
msgstr "Configuración"
|
326 |
+
|
327 |
+
#: class-wc-mercadopago-gateway.php:147
|
328 |
+
#@ wcmercadopago
|
329 |
+
msgid "Choose how the customer will interact with the MercadoPago. Modal Window (Inside your store) Redirect (Client goes to MercadoPago)."
|
330 |
+
msgstr "Elige cómo el cliente va a interactuar con MercadoPago. Ventana Modal (Dentro de su tienda) o Redireccionar (el cliente va a la web de MercadoPago)."
|
331 |
+
|
332 |
+
#. translators: plugin header field 'Version'
|
333 |
+
#: wc-mercadopago.php:0
|
334 |
+
#@ wcmercadopago
|
335 |
+
msgid "1.5.0"
|
336 |
+
msgstr "1.5.0"
|
337 |
+
|
languages/wcmercadopago-pt_BR.mo
ADDED
Binary file
|
languages/wcmercadopago-pt_BR.po
ADDED
@@ -0,0 +1,337 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WooCommerce MercadoPago v1.5.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2013-07-26 04:58:27+0000\n"
|
7 |
+
"Last-Translator: Claudio Sanches <contato@claudiosmweb.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Generator: CSL v1.x\n"
|
14 |
+
"X-Poedit-Language: Portuguese\n"
|
15 |
+
"X-Poedit-Country: BRAZIL\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
+
"X-Poedit-Basepath: ../\n"
|
19 |
+
"X-Poedit-Bookmarks: \n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Textdomain-Support: yes"
|
22 |
+
|
23 |
+
#. translators: plugin header field 'Name'
|
24 |
+
#: wc-mercadopago.php:0
|
25 |
+
#@ wcmercadopago
|
26 |
+
msgid "WooCommerce MercadoPago"
|
27 |
+
msgstr "WooCommerce MercadoPago"
|
28 |
+
|
29 |
+
#. translators: plugin header field 'Description'
|
30 |
+
#: wc-mercadopago.php:0
|
31 |
+
#@ wcmercadopago
|
32 |
+
msgid "Gateway de pagamento MercadoPago para WooCommerce."
|
33 |
+
msgstr "Gateway de pagamento MercadoPago para WooCommerce."
|
34 |
+
|
35 |
+
#. translators: plugin header field 'Author'
|
36 |
+
#: wc-mercadopago.php:0
|
37 |
+
#@ wcmercadopago
|
38 |
+
msgid "claudiosanches"
|
39 |
+
msgstr "claudiosanches"
|
40 |
+
|
41 |
+
#: class-wc-mercadopago-gateway.php:21
|
42 |
+
#: class-wc-mercadopago-gateway.php:117
|
43 |
+
#@ wcmercadopago
|
44 |
+
msgid "MercadoPago"
|
45 |
+
msgstr "MercadoPago"
|
46 |
+
|
47 |
+
#: class-wc-mercadopago-gateway.php:88
|
48 |
+
#@ wcmercadopago
|
49 |
+
msgid "MercadoPago standard"
|
50 |
+
msgstr "MercadoPago padrão"
|
51 |
+
|
52 |
+
#: class-wc-mercadopago-gateway.php:89
|
53 |
+
#@ wcmercadopago
|
54 |
+
msgid "MercadoPago standard works by sending the user to MercadoPago to enter their payment information."
|
55 |
+
msgstr "MercadoPago padrão funciona enviando o usuário para o site do MercadoPago, onde ele irá fazer o pagamento."
|
56 |
+
|
57 |
+
#: class-wc-mercadopago-gateway.php:107
|
58 |
+
#@ wcmercadopago
|
59 |
+
msgid "Enable/Disable"
|
60 |
+
msgstr "Habilita/Desabilita"
|
61 |
+
|
62 |
+
#: class-wc-mercadopago-gateway.php:109
|
63 |
+
#@ wcmercadopago
|
64 |
+
msgid "Enable MercadoPago standard"
|
65 |
+
msgstr "Habilitar MercadoPago padrão"
|
66 |
+
|
67 |
+
#: class-wc-mercadopago-gateway.php:113
|
68 |
+
#@ wcmercadopago
|
69 |
+
msgid "Title"
|
70 |
+
msgstr "Título"
|
71 |
+
|
72 |
+
#: class-wc-mercadopago-gateway.php:115
|
73 |
+
#@ wcmercadopago
|
74 |
+
msgid "This controls the title which the user sees during checkout."
|
75 |
+
msgstr "Isto controla o título que o usuário vê durante o checkout."
|
76 |
+
|
77 |
+
#: class-wc-mercadopago-gateway.php:120
|
78 |
+
#@ wcmercadopago
|
79 |
+
msgid "Description"
|
80 |
+
msgstr "Descrição"
|
81 |
+
|
82 |
+
#: class-wc-mercadopago-gateway.php:122
|
83 |
+
#@ wcmercadopago
|
84 |
+
msgid "This controls the description which the user sees during checkout."
|
85 |
+
msgstr "Isso controla a descrição que o usuário vê durante o checkout."
|
86 |
+
|
87 |
+
#: class-wc-mercadopago-gateway.php:123
|
88 |
+
#: class-wc-mercadopago-gateway.php:289
|
89 |
+
#@ wcmercadopago
|
90 |
+
msgid "Pay via MercadoPago"
|
91 |
+
msgstr "Pagar com MercadoPago"
|
92 |
+
|
93 |
+
#: class-wc-mercadopago-gateway.php:126
|
94 |
+
#@ wcmercadopago
|
95 |
+
msgid "MercadoPago Client_id"
|
96 |
+
msgstr "Client_id do MercadoPago"
|
97 |
+
|
98 |
+
#: class-wc-mercadopago-gateway.php:128
|
99 |
+
#@ wcmercadopago
|
100 |
+
msgid "Please enter your MercadoPago Client_id."
|
101 |
+
msgstr "Por favor digite o seu Client_id do MercadoPago."
|
102 |
+
|
103 |
+
#: class-wc-mercadopago-gateway.php:132
|
104 |
+
#@ wcmercadopago
|
105 |
+
msgid "MercadoPago Client_secret"
|
106 |
+
msgstr "Client_secret do MercadoPago"
|
107 |
+
|
108 |
+
#: class-wc-mercadopago-gateway.php:134
|
109 |
+
#@ wcmercadopago
|
110 |
+
msgid "Please enter your MercadoPago Client_secret."
|
111 |
+
msgstr "Por favor digite o seu Client_secret do MercadoPago."
|
112 |
+
|
113 |
+
#: class-wc-mercadopago-gateway.php:138
|
114 |
+
#@ wcmercadopago
|
115 |
+
msgid "Invoice Prefix"
|
116 |
+
msgstr "Prefixo de pedido"
|
117 |
+
|
118 |
+
#: class-wc-mercadopago-gateway.php:140
|
119 |
+
#@ wcmercadopago
|
120 |
+
msgid "Please enter a prefix for your invoice numbers. If you use your MercadoPago account for multiple stores ensure this prefix is unqiue as MercadoPago will not allow orders with the same invoice number."
|
121 |
+
msgstr "Por favor informe um prefixo para utilizar com os números de pedidos. Caso você utilize sua conta do MercadoPago em mais de uma loja, procure utilizar um prefixo único para cada loja."
|
122 |
+
|
123 |
+
#: class-wc-mercadopago-gateway.php:218
|
124 |
+
#, php-format
|
125 |
+
#@ wcmercadopago
|
126 |
+
msgid "Order %s"
|
127 |
+
msgstr "Pedido %s"
|
128 |
+
|
129 |
+
#: class-wc-mercadopago-gateway.php:222
|
130 |
+
#@ wcmercadopago
|
131 |
+
msgid "Shipping via"
|
132 |
+
msgstr "Entrega via"
|
133 |
+
|
134 |
+
#: class-wc-mercadopago-gateway.php:287
|
135 |
+
#@ wcmercadopago
|
136 |
+
msgid "Thank you for your order, please click the button below to pay with MercadoPago."
|
137 |
+
msgstr "Obrigado por seu pedido, por favor clique no botão abaixo para pagar com MercadoPago."
|
138 |
+
|
139 |
+
#: class-wc-mercadopago-gateway.php:289
|
140 |
+
#@ wcmercadopago
|
141 |
+
msgid "Cancel order & restore cart"
|
142 |
+
msgstr "Cancelar pedido e restaurar carrinho"
|
143 |
+
|
144 |
+
#: class-wc-mercadopago-gateway.php:297
|
145 |
+
#@ wcmercadopago
|
146 |
+
msgid "An error has occurred while processing your payment, please try again. Or contact us for assistance."
|
147 |
+
msgstr "Ocorreu um erro ao processar o seu pagamento, por favor tente novamente ou entre em contato para conseguir ajudar."
|
148 |
+
|
149 |
+
#: class-wc-mercadopago-gateway.php:299
|
150 |
+
#@ wcmercadopago
|
151 |
+
msgid "Click to try again"
|
152 |
+
msgstr "Clique para tentar novamente"
|
153 |
+
|
154 |
+
#: class-wc-mercadopago-gateway.php:500
|
155 |
+
#@ wcmercadopago
|
156 |
+
msgid "MercadoPago Transaction ID"
|
157 |
+
msgstr "MercadoPago: ID da transação"
|
158 |
+
|
159 |
+
#: class-wc-mercadopago-gateway.php:507
|
160 |
+
#@ wcmercadopago
|
161 |
+
msgid "Payer email"
|
162 |
+
msgstr "E-mail do comprador"
|
163 |
+
|
164 |
+
#: class-wc-mercadopago-gateway.php:514
|
165 |
+
#@ wcmercadopago
|
166 |
+
msgid "Payment type"
|
167 |
+
msgstr "Tipo de pagamento"
|
168 |
+
|
169 |
+
#: class-wc-mercadopago-gateway.php:520
|
170 |
+
#@ wcmercadopago
|
171 |
+
msgid "The payment was approved by MercadoPago."
|
172 |
+
msgstr "O pagamento foi aprovado pelo MercadoPago."
|
173 |
+
|
174 |
+
#: class-wc-mercadopago-gateway.php:525
|
175 |
+
#@ wcmercadopago
|
176 |
+
msgid "The user has not completed the payment process yet."
|
177 |
+
msgstr "O cliente ainda não efetuou o pagamento."
|
178 |
+
|
179 |
+
#: class-wc-mercadopago-gateway.php:529
|
180 |
+
#@ wcmercadopago
|
181 |
+
msgid "Payment under review by MercadoPago."
|
182 |
+
msgstr "Pagamento aguardando revisão do MercadoPago."
|
183 |
+
|
184 |
+
#: class-wc-mercadopago-gateway.php:533
|
185 |
+
#@ wcmercadopago
|
186 |
+
msgid "The payment was declined. The user can try again."
|
187 |
+
msgstr "O pagamento foi recusado. O cliente pode tentar novamente."
|
188 |
+
|
189 |
+
#: class-wc-mercadopago-gateway.php:537
|
190 |
+
#@ wcmercadopago
|
191 |
+
msgid "The payment was returned to the user."
|
192 |
+
msgstr "O pagamento foi devolvido ao cliente."
|
193 |
+
|
194 |
+
#: class-wc-mercadopago-gateway.php:541
|
195 |
+
#@ wcmercadopago
|
196 |
+
msgid "Payment canceled by MercadoPago."
|
197 |
+
msgstr "Pagamento cancelado pelo MercadoPago."
|
198 |
+
|
199 |
+
#: class-wc-mercadopago-gateway.php:545
|
200 |
+
#@ wcmercadopago
|
201 |
+
msgid "It started a dispute for payment."
|
202 |
+
msgstr "Foi iniciada uma disputa para o pagamento."
|
203 |
+
|
204 |
+
#: class-wc-mercadopago-gateway.php:563
|
205 |
+
#, php-format
|
206 |
+
#@ wcmercadopago
|
207 |
+
msgid "<strong>Gateway Disabled</strong> You should inform your Client_id in MercadoPago. %sClick here to configure!%s"
|
208 |
+
msgstr "<strong>Método de pagamento desativado</strong> Você deve informar o seu Client_id do MercadoPago. %sClique aqui para configurar!%s"
|
209 |
+
|
210 |
+
#: class-wc-mercadopago-gateway.php:572
|
211 |
+
#, php-format
|
212 |
+
#@ wcmercadopago
|
213 |
+
msgid "<strong>Gateway Disabled</strong> You should inform your Client_secret in MercadoPago. %sClick here to configure!%s"
|
214 |
+
msgstr "<strong>Método de pagamento desativado</strong> Você deve informar o seu Client_secret do MercadoPago. %sClique aqui para configurar!%s"
|
215 |
+
|
216 |
+
#: class-wc-mercadopago-gateway.php:156
|
217 |
+
#@ wcmercadopago
|
218 |
+
msgid "Gateway Testing"
|
219 |
+
msgstr "Teste de Gateway"
|
220 |
+
|
221 |
+
#: class-wc-mercadopago-gateway.php:168
|
222 |
+
#@ wcmercadopago
|
223 |
+
msgid "Debug Log"
|
224 |
+
msgstr "Log de depuração"
|
225 |
+
|
226 |
+
#: class-wc-mercadopago-gateway.php:170
|
227 |
+
#@ wcmercadopago
|
228 |
+
msgid "Enable logging"
|
229 |
+
msgstr "Habilitar log"
|
230 |
+
|
231 |
+
#: class-wc-mercadopago-gateway.php:463
|
232 |
+
#@ wcmercadopago
|
233 |
+
msgid "MercadoPago Request Failure"
|
234 |
+
msgstr "MercadoPago falha na requisição"
|
235 |
+
|
236 |
+
#: class-wc-mercadopago-gateway.php:103
|
237 |
+
#@ wcmercadopago
|
238 |
+
msgid "Argentine"
|
239 |
+
msgstr "Argentina"
|
240 |
+
|
241 |
+
#: class-wc-mercadopago-gateway.php:103
|
242 |
+
#@ wcmercadopago
|
243 |
+
msgid "Brazil"
|
244 |
+
msgstr "Brasil"
|
245 |
+
|
246 |
+
#: class-wc-mercadopago-gateway.php:103
|
247 |
+
#@ wcmercadopago
|
248 |
+
msgid "Mexico"
|
249 |
+
msgstr "México"
|
250 |
+
|
251 |
+
#: class-wc-mercadopago-gateway.php:103
|
252 |
+
#@ wcmercadopago
|
253 |
+
msgid "Venezuela"
|
254 |
+
msgstr "Venezuela"
|
255 |
+
|
256 |
+
#: class-wc-mercadopago-gateway.php:103
|
257 |
+
#@ wcmercadopago
|
258 |
+
msgid "or"
|
259 |
+
msgstr "ou"
|
260 |
+
|
261 |
+
#: class-wc-mercadopago-gateway.php:128
|
262 |
+
#: class-wc-mercadopago-gateway.php:134
|
263 |
+
#, php-format
|
264 |
+
#@ wcmercadopago
|
265 |
+
msgid "You can to get this information in MercadoPago from %s."
|
266 |
+
msgstr "Você pode obter esta informação através do MercadoPago da %s."
|
267 |
+
|
268 |
+
#: class-wc-mercadopago-gateway.php:145
|
269 |
+
#@ wcmercadopago
|
270 |
+
msgid "Integration method"
|
271 |
+
msgstr "Método de integração"
|
272 |
+
|
273 |
+
#: class-wc-mercadopago-gateway.php:151
|
274 |
+
#@ wcmercadopago
|
275 |
+
msgid "Modal Window"
|
276 |
+
msgstr "Janela Modal"
|
277 |
+
|
278 |
+
#: class-wc-mercadopago-gateway.php:152
|
279 |
+
#@ wcmercadopago
|
280 |
+
msgid "Redirect"
|
281 |
+
msgstr "Redirecionar"
|
282 |
+
|
283 |
+
#: class-wc-mercadopago-gateway.php:161
|
284 |
+
#@ wcmercadopago
|
285 |
+
msgid "MercadoPago Sandbox"
|
286 |
+
msgstr "MercadoPago Sandbox"
|
287 |
+
|
288 |
+
#: class-wc-mercadopago-gateway.php:163
|
289 |
+
#@ wcmercadopago
|
290 |
+
msgid "Enable MercadoPago sandbox"
|
291 |
+
msgstr "Habilitar sandbox do MercadoPago"
|
292 |
+
|
293 |
+
#: class-wc-mercadopago-gateway.php:165
|
294 |
+
#@ wcmercadopago
|
295 |
+
msgid "MercadoPago sandbox can be used to test payments."
|
296 |
+
msgstr "MercadoPago sandbox pode ser utilizado para testar os pagamentos."
|
297 |
+
|
298 |
+
#: class-wc-mercadopago-gateway.php:172
|
299 |
+
#, php-format
|
300 |
+
#@ wcmercadopago
|
301 |
+
msgid "Log MercadoPago events, such as API requests, inside %s"
|
302 |
+
msgstr "Registra eventos do MercadoPago, tais como solicitações de API, dentro de %s"
|
303 |
+
|
304 |
+
#. translators: plugin header field 'AuthorURI'
|
305 |
+
#: wc-mercadopago.php:0
|
306 |
+
#@ wcmercadopago
|
307 |
+
msgid "http://claudiosmweb.com/"
|
308 |
+
msgstr "http://claudiosmweb.com/"
|
309 |
+
|
310 |
+
#: wc-mercadopago.php:18
|
311 |
+
#, php-format
|
312 |
+
#@ wcmercadopago
|
313 |
+
msgid "WooCommerce MercadoPago Gateway depends on the last version of %s to work!"
|
314 |
+
msgstr "WooCommerce MercadoPago Gateway depende da última versão do %s para funcionar!"
|
315 |
+
|
316 |
+
#: wc-mercadopago.php:89
|
317 |
+
#@ wcmercadopago
|
318 |
+
msgid "Settings"
|
319 |
+
msgstr "Configurações"
|
320 |
+
|
321 |
+
#. translators: plugin header field 'PluginURI'
|
322 |
+
#: wc-mercadopago.php:0
|
323 |
+
#@ wcmercadopago
|
324 |
+
msgid "https://github.com/claudiosmweb/woocommerce-mercadopago"
|
325 |
+
msgstr "https://github.com/claudiosmweb/woocommerce-mercadopago"
|
326 |
+
|
327 |
+
#: class-wc-mercadopago-gateway.php:147
|
328 |
+
#@ wcmercadopago
|
329 |
+
msgid "Choose how the customer will interact with the MercadoPago. Modal Window (Inside your store) Redirect (Client goes to MercadoPago)."
|
330 |
+
msgstr "Escolha como o cliente vai interagir com o MercadoPago. Janela Modal (dentro de sua loja) redirecionamento (cliente vai para MercadoPago)."
|
331 |
+
|
332 |
+
#. translators: plugin header field 'Version'
|
333 |
+
#: wc-mercadopago.php:0
|
334 |
+
#@ wcmercadopago
|
335 |
+
msgid "1.5.0"
|
336 |
+
msgstr "1.5.0"
|
337 |
+
|
readme.txt
ADDED
@@ -0,0 +1,261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== WooCommerce MercadoPago ===
|
2 |
+
Contributors: claudiosanches
|
3 |
+
Donate link: http://claudiosmweb.com/doacoes/
|
4 |
+
Tags: woocommerce, mercadopago, payment
|
5 |
+
Requires at least: 3.0
|
6 |
+
Tested up to: 3.6
|
7 |
+
Stable tag: 1.5.0
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
Adds MercadoPago gateway to the WooCommerce plugin
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
### Add MercadoPago gateway to WooCommerce ###
|
16 |
+
|
17 |
+
This plugin adds MercadoPago gateway to WooCommerce.
|
18 |
+
|
19 |
+
Please notice that WooCommerce must be installed and active.
|
20 |
+
|
21 |
+
= Contribute =
|
22 |
+
|
23 |
+
You can contribute to the source code in our [GitHub](https://github.com/claudiosmweb/woocommerce-mercadopago) page.
|
24 |
+
|
25 |
+
### Descrição em Português: ###
|
26 |
+
|
27 |
+
Adicione o MercadoPago como método de pagamento em sua loja WooCommerce.
|
28 |
+
|
29 |
+
[MercadoPago](https://www.mercadopago.com/) é um método de pagamento desenvolvido pelo Mercado Livre.
|
30 |
+
|
31 |
+
O plugin WooCommerce MercadoPago foi desenvolvido sem nenhum incentivo do MercadoPago ou Mercado Livre. Nenhum dos desenvolvedores deste plugin possuem vínculos com estas duas empresas.
|
32 |
+
|
33 |
+
Este plugin foi feito baseado na [documentação oficial do MercadoPago](http://developers.mercadopago.com/).
|
34 |
+
|
35 |
+
= Instalação: =
|
36 |
+
|
37 |
+
Confira o nosso guia de instalação e configuração do WooCommerce MercadoPago na aba [Installation](http://wordpress.org/extend/plugins/woocommerce-mercadopago/installation/).
|
38 |
+
|
39 |
+
= Dúvidas? =
|
40 |
+
|
41 |
+
Você pode esclarecer suas dúvidas usando:
|
42 |
+
|
43 |
+
* A nossa sessão de [FAQ](http://wordpress.org/extend/plugins/woocommerce-mercadopago/faq/).
|
44 |
+
* Criando um tópico no [fórum de ajuda do WordPress](http://wordpress.org/support/plugin/woocommerce-mercadopago) (apenas em inglês).
|
45 |
+
* Ou entre em contato com os desenvolvedores do plugin em nossa [página](http://claudiosmweb.com/plugins/mercadopago-para-woocommerce/).
|
46 |
+
|
47 |
+
= Coloborar =
|
48 |
+
|
49 |
+
Você pode contribuir com código-fonte em nossa página no [GitHub](https://github.com/claudiosmweb/woocommerce-mercadopago).
|
50 |
+
|
51 |
+
### Translators ###
|
52 |
+
|
53 |
+
* es_ES by [Marcelo Pedra](http://profiles.wordpress.org/kent-brockman)
|
54 |
+
* es_AR by [Gustavo Coronel](http://profiles.wordpress.org/gcoronel/)
|
55 |
+
|
56 |
+
== Installation ==
|
57 |
+
|
58 |
+
* Upload plugin files to your plugins folder, or install using WordPress built-in Add New Plugin installer;
|
59 |
+
* Activate the plugin;
|
60 |
+
* Navigate to WooCommerce -> Settings -> Payment Gateways, choose MercadoPago and fill in your MercadoPago Client_id and Client_secret.
|
61 |
+
|
62 |
+
### Instalação e configuração em Português: ###
|
63 |
+
|
64 |
+
= Instalação do plugin: =
|
65 |
+
|
66 |
+
* Envie os arquivos do plugin para a pasta wp-content/plugins ou usando o instalador de plugins do WordPress.
|
67 |
+
* Ative o plugin.
|
68 |
+
|
69 |
+
= Requerimentos: =
|
70 |
+
|
71 |
+
É necessário possuir uma conta no [MercadoPago](https://www.mercadopago.com/) e instalar a última versão do [WooCommerce](http://wordpress.org/extend/plugins/woocommerce/).
|
72 |
+
|
73 |
+
= Configurações no MercadoPago: =
|
74 |
+
|
75 |
+
No MercadoPago você precisa validar sua conta e conseguir o seu Client_id e Client_secret.
|
76 |
+
|
77 |
+
Você pode acessar as suas informações de Client_id e Client_secret em:
|
78 |
+
|
79 |
+
* [MercadoPago da Argentina](https://www.mercadopago.com/mla/herramientas/aplicaciones)
|
80 |
+
* [MercadoPago do Brasil](https://www.mercadopago.com/mlb/ferramentas/aplicacoes)
|
81 |
+
* [MercadoPago do México](https://www.mercadopago.com/mlm/herramientas/aplicaciones)
|
82 |
+
* [MercadoPago da Venezuela](https://www.mercadopago.com/mlv/herramientas/aplicaciones)
|
83 |
+
|
84 |
+
É necessário também configurar a página de retorno, para isso é necessário acessar:
|
85 |
+
|
86 |
+
* [MercadoPago da Argentina](https://www.mercadopago.com/mla/herramientas/notificaciones)
|
87 |
+
* [MercadoPago do Brasil](https://www.mercadopago.com/mlb/ferramentas/notificacoes)
|
88 |
+
* [MercadoPago do México](https://www.mercadopago.com/mlm/herramientas/notificaciones)
|
89 |
+
* [MercadoPago da Venezuela](https://www.mercadopago.com/mlv/herramientas/notificaciones)
|
90 |
+
|
91 |
+
Deve ser configurada a sua página de retorno como por exemplo:
|
92 |
+
|
93 |
+
http://seusite.com/?wc-api=WC_MercadoPago_Gateway
|
94 |
+
|
95 |
+
= Configurações do Plugin: =
|
96 |
+
|
97 |
+
Com o plugin instalado acesse o admin do WordPress e entre em "WooCommerce" > "Configurações" > "Portais de pagamento" > "MercadoPago".
|
98 |
+
|
99 |
+
Habilite o MercadoPago, adicione o seu e-mail, Client_id e Client_secret.
|
100 |
+
|
101 |
+
Pronto, sua loja já pode receber pagamentos pelo MercadoPago.
|
102 |
+
|
103 |
+
= Configurações no WooCommerce =
|
104 |
+
|
105 |
+
No WooCommerce 2.0 ou superior existe uma opção para cancelar a compra e liberar o estoque depois de alguns minutos.
|
106 |
+
|
107 |
+
Esta opção não funciona muito bem com o MercadoPago, pois pagamentos por boleto bancário pode demorar até 48 horas para serem validados.
|
108 |
+
|
109 |
+
Para corrigir isso é necessário ir em "WooCommerce" > "Configurações" > "Inventário" e limpar (deixe em branco) o valor da opção **Manter Estoque (minutos)**.
|
110 |
+
|
111 |
+
== Frequently Asked Questions ==
|
112 |
+
|
113 |
+
= What is the plugin license? =
|
114 |
+
|
115 |
+
* This plugin is released under a GPL license.
|
116 |
+
|
117 |
+
= What is needed to use this plugin? =
|
118 |
+
|
119 |
+
* WooCommerce installed and active
|
120 |
+
* Only one account on [MercadoPago](https://www.mercadopago.com/ "MercadoPago").
|
121 |
+
* Get the information of Client_id and Client_secret from MercadoPago.
|
122 |
+
* Set page of automatic return data.
|
123 |
+
|
124 |
+
= Currencies accepted =
|
125 |
+
|
126 |
+
The plugin works with ARS and BRL.
|
127 |
+
|
128 |
+
Add ARS with [WooCommerce ARS Currency](http://wordpress.org/extend/plugins/woocommerce-ars-currency/) plugin.
|
129 |
+
|
130 |
+
### FAQ em Português: ###
|
131 |
+
|
132 |
+
= Qual é a licença do plugin? =
|
133 |
+
|
134 |
+
Este plugin esta licenciado como GPL.
|
135 |
+
|
136 |
+
= O que eu preciso para utilizar este plugin? =
|
137 |
+
|
138 |
+
* Ter instalado o plugin WooCommerce.
|
139 |
+
* Possuir uma conta no MercadoPago.
|
140 |
+
* Pegar as informações de Client_id e Client_secret.
|
141 |
+
* Configurar a página de retorno automático de dados.
|
142 |
+
|
143 |
+
= Moedas aceitas =
|
144 |
+
|
145 |
+
Este plugin funciona com ARS (Peso Argentino) e BRL (Real Brasileiro).
|
146 |
+
|
147 |
+
Adicione a moeda ARS usando o plugin [WooCommerce ARS Currency](http://wordpress.org/extend/plugins/woocommerce-ars-currency/).
|
148 |
+
|
149 |
+
= Como funciona o MercadoPago? =
|
150 |
+
|
151 |
+
* Saiba mais em "[O que é o MercadoPago e como funciona?](http://guia.mercadolivre.com.br/mercadopago-como-funciona-6983-VGP)".
|
152 |
+
|
153 |
+
= Quais são os meios de pagamento que o plugin aceita? =
|
154 |
+
|
155 |
+
São aceitos todos os meios de pagamentos que o MercadoPago disponibiliza.
|
156 |
+
Entretanto você precisa ativa-los na sua conta no MercadoPago.
|
157 |
+
|
158 |
+
Consulte os meios de pagamento em "[Meios de pagamento e parcelamento](https://www.mercadopago.com/mlb/ml.faqs.framework.main.FaqsController?pageId=FAQ&faqId=2991&categId=How&type=FAQ)".
|
159 |
+
|
160 |
+
= Quais são as moedas que o plugin aceita? =
|
161 |
+
|
162 |
+
No momento é aceito **ARL** (Argentine peso ley) e **BRL** (Real Brasileiro).
|
163 |
+
|
164 |
+
= Quais são as taxas de transações que o MercadoPago cobra? =
|
165 |
+
|
166 |
+
Consulte a página "[Taxas do Mercado Pago](http://guia.mercadolivre.com.br/taxas-mercado-pago-12593-VGP)".
|
167 |
+
|
168 |
+
= Como que plugin faz integração com MercadoPago? =
|
169 |
+
|
170 |
+
Fazemos a integração baseada na documentação oficial do MercadoPago que pode ser encontrada em "[MercadoPago Developers](http://developers.mercadopago.com/)"
|
171 |
+
|
172 |
+
= A compra é cancelada após alguns minutos, mesmo com o pedido sendo pago, como resolvo isso? =
|
173 |
+
|
174 |
+
Para resolver este problema vá até "WooCommerce" > "Configurações" > "Inventário" e limpe (deixe em branco) o valor da opção **Manter Estoque (minutos)**.
|
175 |
+
|
176 |
+
= Mais dúvidas relacionadas ao funcionamento do plugin? =
|
177 |
+
|
178 |
+
Entre em contato [clicando aqui](http://claudiosmweb.com/plugins/mercadopago-para-woocommerce/).
|
179 |
+
|
180 |
+
== Screenshots ==
|
181 |
+
|
182 |
+
1. Settings page.
|
183 |
+
2. Checkout page.
|
184 |
+
|
185 |
+
== Changelog ==
|
186 |
+
|
187 |
+
= 1.5.0 - 26/07/2013 =
|
188 |
+
|
189 |
+
* Adicionada tradução para es_ES por [Marcelo Pedra](http://profiles.wordpress.org/kent-brockman)
|
190 |
+
* Adicionado o filtro `woocommerce_mercadopago_icon` para a modificação do ícone durante o checkout.
|
191 |
+
* Adicionado parâmetro $order no filtro `woocommerce_mercadopago_args`.
|
192 |
+
* Melhorias no código.
|
193 |
+
|
194 |
+
= 1.4.0 - 17/07/2013 =
|
195 |
+
|
196 |
+
* Melhoria no código.
|
197 |
+
* Adicionada opção para pagamento direto ou por janela modal.
|
198 |
+
* Adicionada opção de sandbox.
|
199 |
+
* Adicionada compatibilidade com o WooCommerce 2.1 ou superior.
|
200 |
+
* Atualização das traduções em pt_BR e es_AR.
|
201 |
+
|
202 |
+
= 1.3 - 07/04/2013 =
|
203 |
+
|
204 |
+
* Correção do retorno automático de dados na versão 2.0.0 ou superior do WooCommerce.
|
205 |
+
* Atualização das traduções em pt_BR e es_AR.
|
206 |
+
|
207 |
+
= 1.2.3 - 11/03/2013 =
|
208 |
+
|
209 |
+
* Adicionada compatibilidade com as moedas: `MXN`, `USD` e `VEF`.
|
210 |
+
|
211 |
+
= 1.2.2 - 06/03/2013 =
|
212 |
+
|
213 |
+
* Corrigida a compatibilidade com WooCommerce 2.0.0 ou mais recente.
|
214 |
+
|
215 |
+
= 1.2.1 - 08/02/2013 =
|
216 |
+
|
217 |
+
* Corrigido o hook responsavel por salvar as opções para a versão 2.0 RC do WooCommerce.
|
218 |
+
|
219 |
+
= 1.2 - 01/12/2012 =
|
220 |
+
|
221 |
+
* Adicionada tradução para es_AR por [Gustavo Coronel](http://profiles.wordpress.org/gcoronel/)
|
222 |
+
|
223 |
+
= 1.1.1 - 30/11/2012 =
|
224 |
+
|
225 |
+
* Correção dos logs de erro.
|
226 |
+
|
227 |
+
= 1.1 - 30/11/2012 =
|
228 |
+
|
229 |
+
* Adicionada opção para logs de erro.
|
230 |
+
|
231 |
+
= 1.0 =
|
232 |
+
|
233 |
+
* Versão Inicial.
|
234 |
+
|
235 |
+
== Upgrade Notice ==
|
236 |
+
|
237 |
+
= 1.2 =
|
238 |
+
|
239 |
+
* Added es_AR translation.
|
240 |
+
|
241 |
+
= 1.1.1 =
|
242 |
+
|
243 |
+
* Fixed error logs.
|
244 |
+
|
245 |
+
= 1.1 =
|
246 |
+
|
247 |
+
* Added error logs.
|
248 |
+
|
249 |
+
= 1.0 =
|
250 |
+
|
251 |
+
* Enjoy it.
|
252 |
+
|
253 |
+
== License ==
|
254 |
+
|
255 |
+
WooCommerce MercadoPago is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published
|
256 |
+
by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
257 |
+
|
258 |
+
WooCommerce MercadoPago is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
259 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
260 |
+
|
261 |
+
You should have received a copy of the GNU General Public License along with WooCommerce MercadoPago. If not, see <http://www.gnu.org/licenses/>.
|
screenshot-1.png
ADDED
Binary file
|
screenshot-2.png
ADDED
Binary file
|
wc-mercadopago.php
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: WooCommerce MercadoPago
|
4 |
+
* Plugin URI: https://github.com/claudiosmweb/woocommerce-mercadopago
|
5 |
+
* Description: Gateway de pagamento MercadoPago para WooCommerce.
|
6 |
+
* Author: claudiosanches
|
7 |
+
* Author URI: http://claudiosmweb.com/
|
8 |
+
* Version: 1.5.0
|
9 |
+
* License: GPLv2 or later
|
10 |
+
* Text Domain: wcmercadopago
|
11 |
+
* Domain Path: /languages/
|
12 |
+
*/
|
13 |
+
|
14 |
+
/**
|
15 |
+
* WooCommerce fallback notice.
|
16 |
+
*/
|
17 |
+
function wcmercadopago_woocommerce_fallback_notice() {
|
18 |
+
echo '<div class="error"><p>' . sprintf( __( 'WooCommerce MercadoPago Gateway depends on the last version of %s to work!', 'wcmercadopago' ), '<a href="http://wordpress.org/extend/plugins/woocommerce/">WooCommerce</a>' ) . '</p></div>';
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Load functions.
|
23 |
+
*/
|
24 |
+
function wcmercadopago_gateway_load() {
|
25 |
+
|
26 |
+
if ( ! class_exists( 'WC_Payment_Gateway' ) ) {
|
27 |
+
add_action( 'admin_notices', 'wcmercadopago_woocommerce_fallback_notice' );
|
28 |
+
|
29 |
+
return;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Load textdomain.
|
34 |
+
*/
|
35 |
+
load_plugin_textdomain( 'wcmercadopago', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Add the gateway to WooCommerce.
|
39 |
+
*
|
40 |
+
* @param array $methods Default methods.
|
41 |
+
*
|
42 |
+
* @return array Methods with MercadoPago gateway.
|
43 |
+
*/
|
44 |
+
function wcmercadopago_add_gateway( $methods ) {
|
45 |
+
$methods[] = 'WC_MercadoPago_Gateway';
|
46 |
+
|
47 |
+
return $methods;
|
48 |
+
}
|
49 |
+
|
50 |
+
add_filter( 'woocommerce_payment_gateways', 'wcmercadopago_add_gateway' );
|
51 |
+
|
52 |
+
// Include the WC_MercadoPago_Gateway class.
|
53 |
+
require_once plugin_dir_path( __FILE__ ) . 'class-wc-mercadopago-gateway.php';
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
add_action( 'plugins_loaded', 'wcmercadopago_gateway_load', 0 );
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Adds support to legacy IPN.
|
61 |
+
*
|
62 |
+
* @return void
|
63 |
+
*/
|
64 |
+
function wcmercadopago_legacy_ipn() {
|
65 |
+
if ( isset( $_GET['topic'] ) && ! isset( $_GET['wc-api'] ) ) {
|
66 |
+
global $woocommerce;
|
67 |
+
|
68 |
+
$woocommerce->payment_gateways();
|
69 |
+
|
70 |
+
do_action( 'woocommerce_api_wc_mercadopago_gateway' );
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
add_action( 'init', 'wcmercadopago_legacy_ipn' );
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Adds custom settings url in plugins page.
|
78 |
+
*
|
79 |
+
* @param array $links Default links.
|
80 |
+
*
|
81 |
+
* @return array Default links and settings link.
|
82 |
+
*/
|
83 |
+
function wcmercadopago_action_links( $links ) {
|
84 |
+
|
85 |
+
$settings = array(
|
86 |
+
'settings' => sprintf(
|
87 |
+
'<a href="%s">%s</a>',
|
88 |
+
admin_url( 'admin.php?page=woocommerce_settings&tab=payment_gateways§ion=WC_MercadoPago_Gateway' ),
|
89 |
+
__( 'Settings', 'wcmercadopago' )
|
90 |
+
)
|
91 |
+
);
|
92 |
+
|
93 |
+
return array_merge( $settings, $links );
|
94 |
+
}
|
95 |
+
|
96 |
+
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'wcmercadopago_action_links' );
|