Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Soporte pre-autorizaciones para Peru #62

Merged
merged 2 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Model/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,12 @@ public function processCapture(\Magento\Payment\Model\InfoInterface $payment, $a
'order_id' => $order->getIncrementId(),
'source_id' => $token,
'device_session_id' => $device_session_id,
'customer' => $customer_data
'customer' => $customer_data,
'capture' => $capture
);

if ($this->country === 'MX') {
$charge_request['use_card_points'] = $use_card_points;
$charge_request['capture'] = $capture;

// 3D Secure
if ($this->charge_type == '3d') {
$charge_request['use_3d_secure'] = true;
Expand Down
4 changes: 3 additions & 1 deletion etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@
<label>Configuración del cargo</label>
<source_model>Openpay\Cards\Model\Source\PaymentAction</source_model>
<depends>
<field id="country">MX</field>
<field id="country" separator="|">
<value>MX|PE</value>
</field>
<field id="merchant_classification">Openpay</field>
</depends>
<comment>Indica si el cargo se hace o no inmediatamente, con la pre-autorización solo se reserva el monto para ser confirmado o cancelado posteriormente. Las pre-autorizaciones no pueden ser utilizadas en combinación con pago con puntos Bancomer.</comment>
Expand Down