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

v1.4.0: payment link #12

Open
wants to merge 86 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
518371c
feat: added new credit card form
contardi Feb 9, 2024
4b3752a
feat: added setup for old settings and minor bugfixes
Feb 15, 2024
b556413
Merge pull request #1 from vindi/master
contardi Feb 16, 2024
7ea0433
fix: error with 1i18n on setting's page
contardi Feb 16, 2024
d91104c
fix: allow all countris by default
contardi Feb 16, 2024
34e7c27
i18n: add new terms for language file
contardi Feb 16, 2024
bbd7a91
feat: added max installments and minum installment value
contardi Feb 21, 2024
e1d4ec3
fix: import from vindi-m2
contardi Feb 21, 2024
85753ed
Merge branch 'vindi-master'
contardi Feb 21, 2024
50be5ad
feat: added reseller token to transactions
contardi Feb 24, 2024
8a46ed3
feat: added reseller token to transactions
contardi Feb 24, 2024
e0bede9
fix: conflicts vindi's repository
contardi Feb 28, 2024
65bf4c4
Merge branch 'vindi-master'
contardi Feb 28, 2024
c5d8aab
Merge pull request #4 from vindi/master
contardi Mar 6, 2024
e7fa99e
feat: send tracking code to Vindi
contardi Mar 6, 2024
0c02c71
fix: mask also reseller token and token account
contardi Mar 7, 2024
9472e3e
fix: when the card number comes with 4 digits, don't add 20 before it
Apr 8, 2024
69e2364
fix: when the card number comes with 4 digits, don't add 20 before it
Apr 8, 2024
8c85143
fix: when the card number comes with 4 digits, don't add 20 before it
Apr 8, 2024
bd26e0d
doc: added pull request template
Apr 8, 2024
3537738
Merge pull request #6 from vindi/master
contardi Apr 8, 2024
60cf094
fix: observer to bankslippix
contardi Apr 9, 2024
ac0af7b
Merge pull request #7 from vindi/master
contardi Apr 11, 2024
54c5301
fix: cancel unapproved orders without config
contardi Apr 15, 2024
5b6b581
feat: adjust with phpstan
contardi Apr 15, 2024
11ab36a
fix: error monitoring transactions
contardi Apr 24, 2024
e319725
fix: merge conflicts
contardi Apr 24, 2024
92143a9
Merge branch 'vindi-master'
contardi Apr 24, 2024
96a7c95
fix: worng price additional
contardi Apr 30, 2024
3232125
fix: PR from vindi repostory
contardi Apr 30, 2024
f6983d9
fix: update terms to ask for a CPF on checkout
May 7, 2024
8cbb40b
fix: solve conflicts
contardi May 9, 2024
4f4720e
Merge branch 'vindi-master'
contardi May 9, 2024
762fd3d
feat: don't auto select TaxVat when is not a CPF number
contardi May 9, 2024
e1c44a1
feat: don't auto select TaxVat when is not a CPF number
contardi May 9, 2024
1734560
Payment link functionality created
GabrielAntal Jul 22, 2024
1302d22
Vindi payment method verification to send the payment link has been a…
GabrielAntal Jul 23, 2024
d5394f4
The payment link email template changed and made an email configurati…
GabrielAntal Jul 23, 2024
cea0ba8
Template Id changed
GabrielAntal Jul 23, 2024
9fd835f
Merge pull request #11 from GabrielAntal/master
contardi Jul 23, 2024
e3f2144
Email path and list fixed
GabrielAntal Jul 24, 2024
de51898
Merge pull request #12 from GabrielAntal/master
contardi Jul 24, 2024
f6a83ef
feat/VINDI-143: estilo da pagina de link de pagamento com boleto, pix…
carolineesteves Jul 24, 2024
664b053
Merge branch 'master' of https://github.com/bizcommerce/vindi-magento…
carolineesteves Jul 25, 2024
1510aec
feat/VINDI-143: estilizacao pagina link de pagamento
carolineesteves Jul 25, 2024
edd03d9
Merge pull request #13 from carolineesteves/feat/VINDI-143
contardi Jul 25, 2024
7bc7f0b
Use strict added to js file
GabrielAntal Jul 26, 2024
62a8c61
Merge pull request #14 from GabrielAntal/master
contardi Jul 26, 2024
712b1f1
ko library added
GabrielAntal Jul 29, 2024
35096d4
Merge pull request #15 from GabrielAntal/master
contardi Jul 30, 2024
af1b63a
float cast removed
GabrielAntal Jul 30, 2024
6176b2d
Merge pull request #16 from GabrielAntal/master
contardi Jul 30, 2024
3712c61
Applying the requested changes on payment link files
GabrielAntal Aug 1, 2024
7fa96c1
Merge pull request #17 from GabrielAntal/master
contardi Aug 1, 2024
5cd4a10
adding the vindi_customer_taxvat to additionalInformation
GabrielAntal Aug 2, 2024
2c8ead9
Merge pull request #18 from GabrielAntal/master
contardi Aug 2, 2024
3e0bf3c
Fixing the bugs about payment link
GabrielAntal Aug 9, 2024
a054f09
Merge pull request #19 from GabrielAntal/master
contardi Aug 9, 2024
70b6093
VP module version has been updated
GabrielAntal Aug 12, 2024
85e2aea
Merge pull request #20 from GabrielAntal/master
contardi Aug 12, 2024
90ee138
payment link email template has been changed
GabrielAntal Aug 13, 2024
8a88b58
Merge pull request #21 from GabrielAntal/master
contardi Aug 13, 2024
a0c468c
Deleting the payment link when it is expired
GabrielAntal Aug 15, 2024
97145e1
Merge pull request #22 from GabrielAntal/master
contardi Aug 15, 2024
6101364
Fixing the payment link summary details
GabrielAntal Aug 16, 2024
0329105
Merge pull request #23 from GabrielAntal/master
contardi Aug 16, 2024
04c18c0
Adding a discount verification
Aug 20, 2024
c3ab588
Merge pull request #24 from GabrielAntal/master
contardi Aug 20, 2024
79874f1
Making the discount value positive
Aug 20, 2024
772fb5d
Merge branch 'bizcommerce:master' into master
GabrielAntal Aug 20, 2024
c33a95d
Merge pull request #25 from GabrielAntal/master
contardi Aug 20, 2024
c6608ca
fix: change fingerprint loader
contardi Aug 23, 2024
5851020
VINDI-143: pagina de sucesso
carolineesteves Aug 28, 2024
2146fd6
Merge conflicts
carolineesteves Aug 28, 2024
50f6e18
VINDI-143: mensagem de desconto no link de pagamento
carolineesteves Aug 28, 2024
b49b549
Merge pull request #26 from carolineesteves/master
contardi Aug 28, 2024
fcd89a7
Remove linha comentada
carolineesteves Aug 28, 2024
6def442
Merge branch 'master' of https://github.com/bizcommerce/vindi-magento…
carolineesteves Aug 28, 2024
cfe74ab
Merge pull request #27 from carolineesteves/master
carolineesteves Aug 28, 2024
134edc6
The payment link delete has been removed from the payment link page
Sep 5, 2024
d24a182
Merge pull request #28 from GabrielAntal/master
contardi Sep 5, 2024
f2dbd06
fix: add fingerprint method in define
contardi Sep 10, 2024
b46d718
fix: customer without taxvat
contardi Sep 11, 2024
76fc317
fix: preventing conflict with the vindi recurrence module
devbizcommerce Sep 19, 2024
14f8e54
feat: adding security validations and better payment link management
devbizcommerce Oct 15, 2024
dba05dc
fix: phpstan fix
devbizcommerce Oct 15, 2024
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
19 changes: 19 additions & 0 deletions Api/Data/CompanyInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Vindi\VP\Api\Data;

interface CompanyInterface
{
public function getCnpj(): string;

public function setCnpj(string $cnpj): void;

public function getTradeName(): string;

public function setTradeName(string $tradeName): void;

public function getCompanyName(): string;

public function setCompanyName(string $companyName): void;

}
101 changes: 101 additions & 0 deletions Api/Data/PaymentLinkInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?php

declare(strict_types=1);

/**
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Vindi
* @package Vindi_VP
*/

namespace Vindi\VP\Api\Data;

use Magento\Framework\Api\ExtensibleDataInterface;

interface PaymentLinkInterface extends ExtensibleDataInterface
{
const ENTITY_ID = 'entity_id';
const LINK = 'link';
const ORDER_ID = 'order_id';
const VINDI_PAYMENT_METHOD = 'vindi_payment_method';
const CUSTOMER_ID = 'customer_id';
const CREATED_AT = 'created_at';

const STATUS = 'status';

/**
* @return int
*/
public function getEntityId();

/**
* @param int $entityId
*/
public function setEntityId(int $entityId);

/**
* @return int
*/
public function getLink();

/**
* @param string $link
*/
public function setLink(string $link);

/**
* @return int
*/
public function getOrderId();

/**
* @param int $orderId
*/
public function setOrderId(int $orderId);

/**
*
* @return string
*/
public function getCreatedAt();

/**
* @param string $createdAt
*/
public function setCreatedAt(string $createdAt);

/**
* @return string
*/
public function getVindiPaymentMethod();

/**
* @param string $vindiPaymentMethod
*/
public function setVindiPaymentMethod(string $vindiPaymentMethod);

/**
* @return int
*/
public function getCustomerId();

/**
* @param int $customerId
*/
public function setCustomerId(int $customerId);

/**
* @return string
*/
public function getStatus();

/**
* @param string $status
*/
public function setStatus(string $status);
}

39 changes: 39 additions & 0 deletions Api/PaymentLinkRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

declare(strict_types=1);

/**
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Vindi
* @package Vindi_VP
*/

namespace Vindi\VP\Api;

interface PaymentLinkRepositoryInterface
{
/**
* @param int $id
* @return \Vindi\VP\Api\Data\PaymentLinkInterface
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getById($id);

/**
* @param \Vindi\VP\Api\Data\PaymentLinkInterface $paymentLink
* @return \Vindi\VP\Api\Data\PaymentLinkInterface
* @throws \Magento\Framework\Exception\CouldNotSaveException
*/
public function save(\Vindi\VP\Api\Data\PaymentLinkInterface $paymentLink);

/**
* @param \Vindi\VP\Api\Data\PaymentLinkInterface $paymentLink
* @return bool true on success
* @throws \Magento\Framework\Exception\CouldNotDeleteException
*/
public function delete(\Vindi\VP\Api\Data\PaymentLinkInterface $paymentLink);
}
79 changes: 79 additions & 0 deletions Block/Adminhtml/Order/LinkField.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?php

declare(strict_types=1);

/**
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Vindi
* @package Vindi_VP
*
*
*/

namespace Vindi\VP\Block\Adminhtml\Order;

use \Magento\Backend\Block\Template;
use \Magento\Backend\Block\Template\Context;
use Vindi\VP\Model\PaymentLinkService;

class LinkField extends Template
{
const VINDI_PAYMENT_LINK = 'vindi_payment_link';

/**
* @var PaymentLinkService
*/
private PaymentLinkService $paymentLinkService;

/**
* @param Context $context
* @param PaymentLinkService $paymentLinkService
* @param array $data
*/
public function __construct(
Context $context,
PaymentLinkService $paymentLinkService,
array $data = [])
{
$this->paymentLinkService = $paymentLinkService;
parent::__construct($context, $data);
}

/**
* @return mixed
*/
public function getOrderId()
{
$orderId = $this->getRequest()->getParam('order_id');
return $orderId;
}

/**
* @return string
*/
public function getPaymentLink()
{
$paymentLinkData = $this->paymentLinkService->getPaymentLink($this->getOrderId());
$isExpired = false;
if ($paymentLinkData->getData()) $isExpired = $this->paymentLinkService->isLinkExpired($paymentLinkData->getCreatedAt());
return $paymentLinkData->getLink() && !$isExpired ? $paymentLinkData->getLink() : '';
}

/**
* @return string|null
*/
public function getPaymentMethod()
{
$order = $this->paymentLinkService->getOrderByOrderId($this->getOrderId());

if ($order->getData()) {
return $order->getPayment()->getMethod();
}
return null;
}
}
Loading