Skip to content

Commit

Permalink
Merge pull request #8 from mbissonho/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mbissonho authored Apr 24, 2023
2 parents ff79677 + b22917f commit e74dbe1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Cron/UpdatePaymentStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function execute()
$collection = $this->orderCollectionFactory->create();
$collection
->addFieldToSelect('*')
->addFieldToFilter('state', ['eq' => Order::STATE_PENDING_PAYMENT])
->addFieldToFilter('state', ['eq' => Order::STATE_NEW])
->addFieldToFilter('store_id', ['eq' => $storeId ])
->join(
['sop' => $collection->getTable('sales_order_payment')],
Expand Down
2 changes: 1 addition & 1 deletion Gateway/Boleto/Http/Client/IssueBoletoClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function placeRequest(TransferInterface $transferObject): array
$requestData = $transferObject->getBody();

$requestBody = [
'seuNumero' => $requestData['transaction']['your_number'],
'seuNumero' => $requestData['order_increment_id'],
'valorNominal' => $requestData['transaction']['amount'],
'dataVencimento' => $requestData['transaction']['expiration_date'],
'numDiasAgenda' => $requestData['transaction']['days_to_cancel_after_expiration'],
Expand Down
1 change: 0 additions & 1 deletion Gateway/Boleto/Request/Builder/IssueBoletoBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public function build(array $buildSubject): array

return [
'transaction' => [
'your_number' => $methodInstance->getConfigData('your_number', $storeId),
'days_to_cancel_after_expiration' => intval($methodInstance->getConfigData('days_to_cancel_after_expiration', $storeId)),
'expiration_date' => $expirationDate,
'amount' => $order->getGrandTotalAmount()
Expand Down
3 changes: 1 addition & 2 deletions Gateway/Request/Builder/GeneralBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ public function build(array $buildSubject)
$paymentDataObject = SubjectReader::readPayment($buildSubject);
return [
Store::STORE_ID => $paymentDataObject->getOrder()->getStoreId(),
'order_increment_id' => $paymentDataObject->getOrder()->getOrderIncrementId(),
'order_id' => $paymentDataObject->getOrder()->getId()
'order_increment_id' => $paymentDataObject->getOrder()->getOrderIncrementId()
];
} catch (\Throwable $e) {
$this->logger->critical($e);
Expand Down
13 changes: 2 additions & 11 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</depends>
</field>
<field id="certificate_file" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="22" translate="label" type="file">
<label>Certificate File</label>
<label>Certificate File (.crt file)</label>
<config_path>mbissonho_bancointer/mbissonho_bancointer_general/certificate_file</config_path>
<backend_model>Mbissonho\BancoInter\Model\Config\Backend\CertificateFile</backend_model>
<upload_dir config="system/filesystem/var" scope_info="1">mbissonho/bancointer</upload_dir>
Expand All @@ -50,7 +50,7 @@
</depends>
</field>
<field id="ssl_key_file" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="23" translate="label" type="file">
<label>SSL Key File</label>
<label>SSL Key File (.key file)</label>
<config_path>mbissonho_bancointer/mbissonho_bancointer_general/ssl_key_file</config_path>
<backend_model>Mbissonho\BancoInter\Model\Config\Backend\SSLKeyFile</backend_model>
<upload_dir config="system/filesystem/var" scope_info="1">mbissonho/bancointer</upload_dir>
Expand Down Expand Up @@ -88,15 +88,6 @@
</depends>
</field>

<field id="your_number" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="20" translate="label" type="text">
<label>Your number</label>
<config_path>payment/mbissonho_bancointer_boleto/your_number</config_path>
<validate>required-entry integer</validate>
<depends>
<field id="active">1</field>
</depends>
</field>

<field id="expiration_days" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="20" translate="label" type="text">
<label>Default expiration days</label>
<config_path>payment/mbissonho_bancointer_boleto/expiration_days</config_path>
Expand Down
5 changes: 3 additions & 2 deletions i18n/pt_BR.csv
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"Your number", "Seu número"
"Default expiration days", "Dias para vencimento padrão"
"Days to cancel after expiration", "Dias para cancelar após o vencimento"
"Certificate File", "Arquivo do Certificado"
"SSL Key File", "Arquivo da Chave Privada"
"Certificate File (.crt file)", "Arquivo do Certificado (arquivo .crt)"
"SSL Key File (.key file)", "Arquivo da Chave Privada (arquivo .key)"
"Payment Identifier", "Identificador do Pagamento"


2 changes: 1 addition & 1 deletion view/adminhtml/templates/info/boleto.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $title = $block->escapeHtml($block->getMethod()->getTitle());
?>

<dt>
<span><?= __('Our Number'); ?>: </span><span><?= $ourNumber ?></span>
<span><?= __('Payment Identifier'); ?>: </span><span><?= $ourNumber ?></span>
</dt>
<?php
}
Expand Down

0 comments on commit e74dbe1

Please sign in to comment.