├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE │ └── master.md ├── README.md ├── contributing.md ├── data │ ├── Dockerfile │ ├── custom.ini │ └── install-zips.sh ├── pull_request_template.md └── workflows │ ├── build_branch.yml │ ├── cd_master.yml │ ├── cd_php8.yml │ ├── cd_reusable.yml │ ├── cd_stg.yml │ └── pr.yml ├── .gitignore ├── .htaccess ├── .jshintignore ├── .jshintrc ├── Dockerfile ├── Gruntfile.js ├── LICENSE ├── Makefile ├── assets ├── images │ ├── barcode.svg │ ├── pagarme-avatar-white.svg │ ├── pagarme-avatar.svg │ ├── pix-checkout-attention.svg │ └── pix.svg ├── index.php ├── javascripts │ ├── admin │ │ ├── index.php │ │ ├── pagarme_notices.js │ │ ├── pagarme_payments.js │ │ ├── pagarme_payments_validation.js │ │ ├── pagarme_settings.js │ │ ├── sales │ │ │ └── order │ │ │ │ └── view │ │ │ │ ├── cancel-capture.js │ │ │ │ └── index.php │ │ └── vendor │ │ │ ├── index.php │ │ │ └── iziModal.min.js │ ├── front │ │ ├── checkout │ │ │ ├── checkoutFields.js │ │ │ └── model │ │ │ │ ├── multicustomers.js │ │ │ │ └── payment │ │ │ │ ├── billet.js │ │ │ │ ├── card.js │ │ │ │ ├── card │ │ │ │ ├── initTds.js │ │ │ │ ├── tds.js │ │ │ │ ├── tdsToken.js │ │ │ │ ├── tokenize.js │ │ │ │ └── wallet.js │ │ │ │ ├── googlepay.js │ │ │ │ ├── order-value.js │ │ │ │ ├── pix.js │ │ │ │ ├── two-cards.js │ │ │ │ └── voucher.js │ │ ├── index.php │ │ ├── my-account │ │ │ └── wallet.js │ │ └── reactCheckout │ │ │ └── payments │ │ │ ├── Billet │ │ │ └── index.js │ │ │ ├── Card │ │ │ ├── index.js │ │ │ ├── inputs │ │ │ │ ├── components │ │ │ │ │ ├── InputCvv │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── InputExpiry │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── InputHolderName │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── useInputHolderName.js │ │ │ │ │ ├── InputNumber │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── useInputNumber.js │ │ │ │ │ ├── Installments │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── installmentsTypeEnum.js │ │ │ │ │ │ └── useInstallments.js │ │ │ │ │ ├── MaskedInput │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── useMaskedInput.js │ │ │ │ │ └── Wallet │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── useWallet.js │ │ │ │ └── utils │ │ │ │ │ ├── cardNumberFormatter.js │ │ │ │ │ ├── expirationDate.js │ │ │ │ │ └── installmentsFormatter.js │ │ │ ├── token │ │ │ │ ├── token.js │ │ │ │ ├── tokenizeException.js │ │ │ │ └── tokenizeMultiCards.js │ │ │ ├── useCard.js │ │ │ └── useCardValidation.js │ │ │ ├── Common │ │ │ └── hooks │ │ │ │ └── usePrevious.js │ │ │ ├── CreditCard │ │ │ ├── index.js │ │ │ └── useCreditCard.js │ │ │ ├── GooglePay │ │ │ ├── index.js │ │ │ └── validateBilling.js │ │ │ ├── PaymentWithInstructions │ │ │ ├── index.js │ │ │ └── usePaymentWithInstructions.js │ │ │ ├── Pix │ │ │ └── index.js │ │ │ └── store │ │ │ ├── cards.js │ │ │ └── googlepay.js │ ├── index.php │ └── vendor │ │ ├── index.php │ │ ├── jquery.mask.js │ │ └── sweetalert2.all.min.js └── stylesheets │ ├── admin │ ├── index.php │ ├── notice.css │ └── style.css │ ├── front │ ├── index.php │ └── style.css │ ├── index.php │ └── vendor │ ├── iziModal.min.css │ └── sweetalert2.min.css ├── build ├── billet.asset.php ├── billet.js ├── credit_card.asset.php ├── credit_card.js ├── pix.asset.php └── pix.js ├── composer.json ├── constants.php ├── docker-compose.yml ├── docs ├── README.md ├── filters-actions │ └── split.md └── images │ ├── pagarme+woocommerce-white.png │ └── pagarme+woocommerce.png ├── e2e ├── .gitignore ├── Dockerfile ├── README.md ├── helper │ ├── checkout_helper.js │ ├── data_helper.js │ ├── pagarme_helper.js │ └── product_helper.js ├── package-lock.json ├── package.json ├── playwright.config.js └── tests │ └── cartao-de-credito.e2e.test.js ├── grunt ├── concat.js ├── concurrent.js ├── index.php ├── makepot.js ├── sass.js ├── uglify.js └── watch.js ├── index.php ├── languages ├── index.php ├── woo-pagarme-payments-pt_BR.mo └── woo-pagarme-payments-pt_BR.po ├── logs └── index.php ├── package.json ├── phpcs.xml ├── phpunit.xml ├── readme.txt ├── sonar-project.properties ├── src ├── Action │ ├── ActionsRunner.php │ ├── CustomerFieldsActions.php │ ├── OrderActions.php │ └── RunnerInterface.php ├── Block │ ├── AbstractBlock.php │ ├── Account │ │ └── Wallet.php │ ├── Adminhtml │ │ ├── Sales │ │ │ ├── Order.php │ │ │ └── Order │ │ │ │ ├── AbstractMetaBox.php │ │ │ │ ├── MetaBox │ │ │ │ ├── AdditionalInformation.php │ │ │ │ ├── ChargeActions.php │ │ │ │ └── Modal.php │ │ │ │ ├── MetaBoxInterface.php │ │ │ │ └── MetaBoxes.php │ │ └── System │ │ │ └── Config │ │ │ ├── Form │ │ │ ├── AbstractField.php │ │ │ ├── Field │ │ │ │ ├── Checkbox.php │ │ │ │ ├── Hub │ │ │ │ │ ├── Environment.php │ │ │ │ │ └── Integration.php │ │ │ │ ├── Select.php │ │ │ │ └── Text.php │ │ │ └── Section.php │ │ │ └── Page │ │ │ └── PageSettings.php │ ├── Checkout │ │ ├── Environment.php │ │ ├── Field │ │ │ ├── EnableMulticustomers.php │ │ │ └── Wallet.php │ │ ├── Form │ │ │ ├── Billet.php │ │ │ ├── Card.php │ │ │ ├── GooglePay.php │ │ │ ├── Installments.php │ │ │ ├── Multicustomers.php │ │ │ ├── Pix.php │ │ │ ├── Tds.php │ │ │ └── Wallet.php │ │ ├── Gateway.php │ │ ├── Payment │ │ │ ├── Billet.php │ │ │ ├── BilletAndCard.php │ │ │ ├── CreditCard.php │ │ │ ├── Googlepay.php │ │ │ ├── Pix.php │ │ │ ├── TwoCards.php │ │ │ └── Voucher.php │ │ ├── ThankYou.php │ │ └── ThankYou │ │ │ ├── Billet.php │ │ │ ├── BilletAndCard.php │ │ │ ├── CreditCard.php │ │ │ ├── Googlepay.php │ │ │ ├── Pix.php │ │ │ ├── StatusTransaction.php │ │ │ ├── TwoCards.php │ │ │ └── Voucher.php │ ├── Order │ │ ├── Charge.php │ │ ├── Email │ │ │ ├── AbstractCard.php │ │ │ ├── AbstractEmail.php │ │ │ ├── Boleto.php │ │ │ ├── CreditCard.php │ │ │ ├── DefaultEmail.php │ │ │ ├── Pix.php │ │ │ └── Voucher.php │ │ ├── EmailCharge.php │ │ ├── EmailPaymentDetails.php │ │ ├── PaymentDetails.php │ │ └── Transaction │ │ │ ├── AbstractCard.php │ │ │ ├── AbstractTransaction.php │ │ │ ├── Boleto.php │ │ │ ├── CreditCard.php │ │ │ ├── DefaultTransaction.php │ │ │ ├── Pix.php │ │ │ └── Voucher.php │ ├── ReactCheckout │ │ ├── AbstractCard.php │ │ ├── AbstractPaymentMethodBlock.php │ │ ├── AbstractPaymentWithCheckoutInstructionsBlock.php │ │ ├── Billet.php │ │ ├── CreditCard.php │ │ ├── GooglePay.php │ │ └── Pix.php │ └── Template.php ├── Concrete │ ├── WoocommerceCoreSetup.php │ ├── WoocommerceDataService.php │ ├── WoocommerceDatabaseDecorator.php │ ├── WoocommercePlatformCreditmemoDecorator.php │ ├── WoocommercePlatformCustomerDecorator.php │ ├── WoocommercePlatformInvoiceDecorator.php │ ├── WoocommercePlatformOrderDecorator.php │ ├── WoocommercePlatformPaymentMethodDecorator.php │ ├── WoocommercePlatformProductDecorator.php │ └── WoocommerceSavedCardAdapter.php ├── Controller │ ├── Accounts.php │ ├── Charges.php │ ├── Checkout.php │ ├── Checkout │ │ ├── Card.php │ │ └── CustomerFields.php │ ├── Gateways │ │ ├── AbstractGateway.php │ │ ├── Billet.php │ │ ├── BilletCreditCard.php │ │ ├── CreditCard.php │ │ ├── Exceptions │ │ │ └── InvalidOptionException.php │ │ ├── GooglePay.php │ │ ├── Pix.php │ │ ├── TwoCreditCard.php │ │ └── Voucher.php │ ├── Hub.php │ ├── HubAccounts.php │ ├── HubCommand.php │ ├── Orders.php │ ├── Settings.php │ ├── TdsToken.php │ ├── Webhooks.php │ └── index.php ├── Core.php ├── DB │ └── Migration │ │ ├── AbstractMigration.php │ │ ├── MigrationInterface.php │ │ ├── Migrations │ │ └── 2021-10-28-0000-TypeInSavedCardTable.php │ │ └── Migrator.php ├── Helper │ ├── Utils.php │ └── index.php ├── Model │ ├── Account.php │ ├── CardInstallments.php │ ├── Charge.php │ ├── Checkout.php │ ├── Config.php │ ├── Config │ │ ├── PagarmeCoreConfigManagement.php │ │ └── Source │ │ │ ├── AbstractOptions.php │ │ │ ├── CheckoutTypes.php │ │ │ ├── EnvironmentsTypes.php │ │ │ └── Yesno.php │ ├── CoreAuth.php │ ├── Customer.php │ ├── Data │ │ ├── DataObject.php │ │ └── OptionSourceInterface.php │ ├── FeatureCompatibilization.php │ ├── Gateway.php │ ├── Meta.php │ ├── Order.php │ ├── Payment.php │ ├── Payment │ │ ├── AbstractPayment.php │ │ ├── AbstractPaymentWithCheckoutInstructions.php │ │ ├── Billet.php │ │ ├── Billet │ │ │ ├── AbstractBank.php │ │ │ ├── BankInterface.php │ │ │ ├── Banks.php │ │ │ └── Banks │ │ │ │ ├── BancoDoBrasil.php │ │ │ │ ├── Bradesco.php │ │ │ │ ├── CaixaEconomicaFederal.php │ │ │ │ ├── Citibank.php │ │ │ │ ├── Itau.php │ │ │ │ └── Santander.php │ │ ├── BilletCard.php │ │ ├── Card.php │ │ ├── CreditCard.php │ │ ├── CreditCard │ │ │ ├── AbstractBrands.php │ │ │ ├── Brands.php │ │ │ ├── Brands │ │ │ │ ├── Amex.php │ │ │ │ ├── Aura.php │ │ │ │ ├── Banese.php │ │ │ │ ├── Cabal.php │ │ │ │ ├── Credz.php │ │ │ │ ├── Diners.php │ │ │ │ ├── Discover.php │ │ │ │ ├── Elo.php │ │ │ │ ├── HiperCard.php │ │ │ │ ├── JCB.php │ │ │ │ ├── MasterCard.php │ │ │ │ └── Visa.php │ │ │ └── BrandsInterface.php │ │ ├── Data │ │ │ ├── AbstractAddress.php │ │ │ ├── AbstractPayment.php │ │ │ ├── AddressInterface.php │ │ │ ├── Billet.php │ │ │ ├── BillingAddress.php │ │ │ ├── Card.php │ │ │ ├── Cards.php │ │ │ ├── Googlepay.php │ │ │ ├── Multicustomers.php │ │ │ ├── PaymentRequest.php │ │ │ ├── PaymentRequestInterface.php │ │ │ ├── Pix.php │ │ │ ├── ShippingAddress.php │ │ │ └── ShippingMethod.php │ │ ├── GooglePay.php │ │ ├── PaymentInterface.php │ │ ├── Pix.php │ │ ├── PostFormatter.php │ │ ├── TwoCards.php │ │ ├── Voucher.php │ │ └── Voucher │ │ │ ├── AbstractBrands.php │ │ │ ├── Brands.php │ │ │ ├── Brands │ │ │ ├── Alelo.php │ │ │ ├── Sodexo.php │ │ │ ├── Ticket.php │ │ │ └── VR.php │ │ │ └── BrandsInterface.php │ ├── Serialize │ │ └── Serializer │ │ │ └── Json.php │ ├── Subscription.php │ ├── SubscriptionMeta.php │ ├── WooOrderRepository.php │ └── index.php └── Service │ ├── AccountService.php │ ├── CardService.php │ ├── CustomerService.php │ ├── LogService.php │ └── TdsTokenService.php ├── templates ├── adminhtml │ ├── sales │ │ ├── order.phtml │ │ └── order │ │ │ └── meta-box │ │ │ ├── additional-information.phtml │ │ │ ├── charge-actions.phtml │ │ │ └── modal.phtml │ └── system │ │ └── config │ │ ├── form │ │ └── field │ │ │ ├── checkbox.phtml │ │ │ ├── hub │ │ │ ├── environment.phtml │ │ │ └── integration.phtml │ │ │ ├── main.phtml │ │ │ ├── select.phtml │ │ │ └── text.phtml │ │ └── page │ │ └── settings.phtml ├── checkout │ ├── default.php │ ├── form │ │ ├── billet.phtml │ │ ├── card.phtml │ │ ├── card │ │ │ ├── installments.phtml │ │ │ ├── tds.phtml │ │ │ └── wallet.phtml │ │ ├── field │ │ │ ├── card-save.phtml │ │ │ └── enable-multicustomers.phtml │ │ ├── multicustomers.php │ │ └── pix.phtml │ ├── payment │ │ ├── 2-cards.phtml │ │ ├── billet-and-card.phtml │ │ ├── billet.phtml │ │ ├── credit-card.phtml │ │ ├── pix.phtml │ │ └── voucher.phtml │ ├── thank-you.phtml │ └── thankyou │ │ ├── 2-cards.phtml │ │ ├── billet-and-card.phtml │ │ ├── billet.phtml │ │ ├── credit-card.phtml │ │ ├── pix.phtml │ │ ├── status-transaction.phtml │ │ └── voucher.phtml ├── index.php ├── myaccount │ ├── index.php │ └── wallet.phtml ├── order │ ├── charge.phtml │ ├── email-charge.phtml │ ├── email-payment-details.phtml │ ├── email │ │ ├── billet.phtml │ │ ├── card.phtml │ │ ├── default.phtml │ │ └── pix.phtml │ ├── payment-details.phtml │ └── transaction │ │ ├── billet.phtml │ │ ├── card.phtml │ │ ├── default.phtml │ │ └── pix.phtml └── thank-you-page.php ├── tests ├── Block │ └── Checkout │ │ └── GatewayTest.php ├── Concrete │ ├── WoocommerceCoreSetupTest.php │ └── WoocommercePlatformOrderDecoratorTest.php ├── Model │ ├── CheckoutTest.php │ ├── CoreTest.php │ ├── CustomerTest.php │ └── Payment │ │ └── CreditCardTest.php └── Service │ ├── AccountServiceTest.php │ └── TdsTokenServiceTest.php ├── vendor ├── apimatic │ ├── jsonmapper │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── ChangeLog │ │ ├── README.rst │ │ ├── composer.json │ │ ├── example │ │ │ ├── Address.php │ │ │ ├── Contact.php │ │ │ ├── run.php │ │ │ └── single.json │ │ ├── package.xml │ │ ├── src │ │ │ ├── JsonMapper.php │ │ │ └── JsonMapperException.php │ │ └── tests │ │ │ ├── JsonMapperTest.php │ │ │ ├── JsonMapperTest │ │ │ ├── Array.php │ │ │ ├── Broken.php │ │ │ ├── DependencyInjector.php │ │ │ ├── DerivedClass.php │ │ │ ├── DerivedClass2.php │ │ │ ├── FactoryMethod.php │ │ │ ├── FactoryMethodWithError.php │ │ │ ├── Logger.php │ │ │ ├── PrivateWithSetter.php │ │ │ ├── Simple.php │ │ │ ├── SimpleBase.php │ │ │ └── ValueObject.php │ │ │ ├── bootstrap.php │ │ │ ├── namespacetest │ │ │ ├── NamespaceTest.php │ │ │ ├── Unit.php │ │ │ ├── UnitData.php │ │ │ └── model │ │ │ │ ├── User.php │ │ │ │ └── UserList.php │ │ │ ├── othernamespace │ │ │ └── Foo.php │ │ │ └── phpunit.xml │ └── unirest-php │ │ ├── .editorconfig │ │ ├── .github │ │ └── workflows │ │ │ └── php.yml │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ ├── phpunit.xml │ │ ├── src │ │ ├── Unirest.php │ │ └── Unirest │ │ │ ├── Exception.php │ │ │ ├── Method.php │ │ │ ├── OverrideRetry.php │ │ │ ├── Request.php │ │ │ ├── Request │ │ │ └── Body.php │ │ │ └── Response.php │ │ └── tests │ │ ├── Unirest │ │ ├── BodyTest.php │ │ ├── RequestChild.php │ │ ├── RequestTest.php │ │ └── ResponseTest.php │ │ ├── bootstrap.php │ │ └── fixtures │ │ └── upload.txt ├── autoload.php ├── composer │ ├── ClassLoader.php │ ├── InstalledVersions.php │ ├── LICENSE │ ├── autoload_classmap.php │ ├── autoload_namespaces.php │ ├── autoload_psr4.php │ ├── autoload_real.php │ ├── autoload_static.php │ ├── installed.json │ ├── installed.php │ └── platform_check.php ├── haydenpierce │ └── class-finder │ │ ├── .gitattributes │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ ├── AppConfig.php │ │ ├── ClassFinder.php │ │ ├── Classmap │ │ ├── ClassmapEntry.php │ │ ├── ClassmapEntryFactory.php │ │ └── ClassmapFinder.php │ │ ├── Exception │ │ └── ClassFinderException.php │ │ ├── Files │ │ ├── FilesEntry.php │ │ ├── FilesEntryFactory.php │ │ └── FilesFinder.php │ │ ├── FinderInterface.php │ │ └── PSR4 │ │ ├── PSR4Finder.php │ │ ├── PSR4Namespace.php │ │ └── PSR4NamespaceFactory.php ├── mashape │ └── unirest-php │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ ├── phpunit.xml │ │ ├── src │ │ ├── Unirest.php │ │ └── Unirest │ │ │ ├── Exception.php │ │ │ ├── Method.php │ │ │ ├── Request.php │ │ │ ├── Request │ │ │ └── Body.php │ │ │ └── Response.php │ │ └── tests │ │ ├── Unirest │ │ ├── BodyTest.php │ │ ├── RequestTest.php │ │ └── ResponseTest.php │ │ ├── bootstrap.php │ │ └── fixtures │ │ └── upload.txt ├── monolog │ └── monolog │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ ├── phpstan.neon.dist │ │ └── src │ │ └── Monolog │ │ ├── ErrorHandler.php │ │ ├── Formatter │ │ ├── ChromePHPFormatter.php │ │ ├── ElasticaFormatter.php │ │ ├── FlowdockFormatter.php │ │ ├── FluentdFormatter.php │ │ ├── FormatterInterface.php │ │ ├── GelfMessageFormatter.php │ │ ├── HtmlFormatter.php │ │ ├── JsonFormatter.php │ │ ├── LineFormatter.php │ │ ├── LogglyFormatter.php │ │ ├── LogstashFormatter.php │ │ ├── MongoDBFormatter.php │ │ ├── NormalizerFormatter.php │ │ ├── ScalarFormatter.php │ │ └── WildfireFormatter.php │ │ ├── Handler │ │ ├── AbstractHandler.php │ │ ├── AbstractProcessingHandler.php │ │ ├── AbstractSyslogHandler.php │ │ ├── AmqpHandler.php │ │ ├── BrowserConsoleHandler.php │ │ ├── BufferHandler.php │ │ ├── ChromePHPHandler.php │ │ ├── CouchDBHandler.php │ │ ├── CubeHandler.php │ │ ├── Curl │ │ │ └── Util.php │ │ ├── DeduplicationHandler.php │ │ ├── DoctrineCouchDBHandler.php │ │ ├── DynamoDbHandler.php │ │ ├── ElasticsearchHandler.php │ │ ├── ErrorLogHandler.php │ │ ├── FilterHandler.php │ │ ├── FingersCrossed │ │ │ ├── ActivationStrategyInterface.php │ │ │ ├── ChannelLevelActivationStrategy.php │ │ │ └── ErrorLevelActivationStrategy.php │ │ ├── FingersCrossedHandler.php │ │ ├── FirePHPHandler.php │ │ ├── FleepHookHandler.php │ │ ├── FlowdockHandler.php │ │ ├── FormattableHandlerInterface.php │ │ ├── FormattableHandlerTrait.php │ │ ├── GelfHandler.php │ │ ├── GroupHandler.php │ │ ├── HandlerInterface.php │ │ ├── HandlerWrapper.php │ │ ├── HipChatHandler.php │ │ ├── IFTTTHandler.php │ │ ├── InsightOpsHandler.php │ │ ├── LogEntriesHandler.php │ │ ├── LogglyHandler.php │ │ ├── MailHandler.php │ │ ├── MandrillHandler.php │ │ ├── MissingExtensionException.php │ │ ├── MongoDBHandler.php │ │ ├── NativeMailerHandler.php │ │ ├── NewRelicHandler.php │ │ ├── NullHandler.php │ │ ├── PHPConsoleHandler.php │ │ ├── ProcessableHandlerInterface.php │ │ ├── ProcessableHandlerTrait.php │ │ ├── PsrHandler.php │ │ ├── PushoverHandler.php │ │ ├── RavenHandler.php │ │ ├── RedisHandler.php │ │ ├── RollbarHandler.php │ │ ├── RotatingFileHandler.php │ │ ├── SamplingHandler.php │ │ ├── Slack │ │ │ └── SlackRecord.php │ │ ├── SlackHandler.php │ │ ├── SlackWebhookHandler.php │ │ ├── SlackbotHandler.php │ │ ├── SocketHandler.php │ │ ├── StreamHandler.php │ │ ├── SwiftMailerHandler.php │ │ ├── SyslogHandler.php │ │ ├── SyslogUdp │ │ │ └── UdpSocket.php │ │ ├── SyslogUdpHandler.php │ │ ├── TestHandler.php │ │ ├── WhatFailureGroupHandler.php │ │ └── ZendMonitorHandler.php │ │ ├── Logger.php │ │ ├── Processor │ │ ├── GitProcessor.php │ │ ├── IntrospectionProcessor.php │ │ ├── MemoryPeakUsageProcessor.php │ │ ├── MemoryProcessor.php │ │ ├── MemoryUsageProcessor.php │ │ ├── MercurialProcessor.php │ │ ├── ProcessIdProcessor.php │ │ ├── ProcessorInterface.php │ │ ├── PsrLogMessageProcessor.php │ │ ├── TagProcessor.php │ │ ├── UidProcessor.php │ │ └── WebProcessor.php │ │ ├── Registry.php │ │ ├── ResettableInterface.php │ │ ├── SignalHandler.php │ │ └── Utils.php ├── pagarme │ ├── ecommerce-module-core │ │ ├── .github │ │ │ ├── CONTRIBUTING.md │ │ │ ├── ISSUE-TEMPLATE.md │ │ │ └── PULL_REQUEST_TEMPLATE.md │ │ ├── .gitignore │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── azure-pipelines.yml │ │ ├── codacy-coverage.phar │ │ ├── composer.json │ │ ├── contributing.md │ │ ├── docker-compose.yml.example │ │ ├── hooks │ │ │ └── pre-commit │ │ ├── integrityDeploy.php │ │ ├── phpunit.xml │ │ ├── src │ │ │ ├── Hub │ │ │ │ ├── Aggregates │ │ │ │ │ └── InstallToken.php │ │ │ │ ├── Commands │ │ │ │ │ ├── AbstractCommand.php │ │ │ │ │ ├── CommandType.php │ │ │ │ │ ├── InstallCommand.php │ │ │ │ │ ├── UninstallCommand.php │ │ │ │ │ └── UpdateCommand.php │ │ │ │ ├── Factories │ │ │ │ │ ├── HubCommandFactory.php │ │ │ │ │ └── InstallTokenFactory.php │ │ │ │ ├── Repositories │ │ │ │ │ └── InstallTokenRepository.php │ │ │ │ ├── Services │ │ │ │ │ └── HubIntegrationService.php │ │ │ │ └── ValueObjects │ │ │ │ │ └── HubInstallToken.php │ │ │ ├── Kernel │ │ │ │ ├── Abstractions │ │ │ │ │ ├── AbstractCreditmemoDecorator.php │ │ │ │ │ ├── AbstractDataService.php │ │ │ │ │ ├── AbstractDatabaseDecorator.php │ │ │ │ │ ├── AbstractEntity.php │ │ │ │ │ ├── AbstractI18NTable.php │ │ │ │ │ ├── AbstractInvoiceDecorator.php │ │ │ │ │ ├── AbstractModuleCoreSetup.php │ │ │ │ │ ├── AbstractPlatformOrderDecorator.php │ │ │ │ │ ├── AbstractRepository.php │ │ │ │ │ └── AbstractValueObject.php │ │ │ │ ├── Aggregates │ │ │ │ │ ├── Charge.php │ │ │ │ │ ├── Configuration.php │ │ │ │ │ ├── LogObject.php │ │ │ │ │ ├── Order.php │ │ │ │ │ └── Transaction.php │ │ │ │ ├── Exceptions │ │ │ │ │ ├── AbstractPagarmeCoreException.php │ │ │ │ │ ├── InvalidClassException.php │ │ │ │ │ ├── InvalidOperationException.php │ │ │ │ │ ├── InvalidParamException.php │ │ │ │ │ └── NotFoundException.php │ │ │ │ ├── Factories │ │ │ │ │ ├── ChargeFactory.php │ │ │ │ │ ├── ConfigurationFactory.php │ │ │ │ │ ├── Configurations │ │ │ │ │ │ ├── DebitConfigFactory.php │ │ │ │ │ │ ├── GooglePayConfigFactory.php │ │ │ │ │ │ ├── MarketplaceConfigFactory.php │ │ │ │ │ │ ├── PixConfigFactory.php │ │ │ │ │ │ ├── RecurrenceConfigFactory.php │ │ │ │ │ │ └── VoucherConfigFactory.php │ │ │ │ │ ├── LogObjectFactory.php │ │ │ │ │ ├── OrderFactory.php │ │ │ │ │ └── TransactionFactory.php │ │ │ │ ├── Helper │ │ │ │ │ └── StringFunctionsHelper.php │ │ │ │ ├── I18N │ │ │ │ │ ├── ENUS.php │ │ │ │ │ └── PTBR.php │ │ │ │ ├── Interfaces │ │ │ │ │ ├── ChargeInterface.php │ │ │ │ │ ├── CommandInterface.php │ │ │ │ │ ├── FactoryCreateFromDbDataInterface.php │ │ │ │ │ ├── FactoryCreateFromPostDataInterface.php │ │ │ │ │ ├── FactoryInterface.php │ │ │ │ │ ├── I18NTableInterface.php │ │ │ │ │ ├── PlatformCreditmemoInterface.php │ │ │ │ │ ├── PlatformCustomerInterface.php │ │ │ │ │ ├── PlatformInvoiceInterface.php │ │ │ │ │ ├── PlatformOrderInterface.php │ │ │ │ │ ├── PlatformPaymentMethodInterface.php │ │ │ │ │ ├── PlatformProductInterface.php │ │ │ │ │ └── SensibleDataInterface.php │ │ │ │ ├── Log │ │ │ │ │ ├── BlurData.php │ │ │ │ │ └── JsonPrettyFormatter.php │ │ │ │ ├── Repositories │ │ │ │ │ ├── ChargeRepository.php │ │ │ │ │ ├── ConfigurationRepository.php │ │ │ │ │ ├── OrderRepository.php │ │ │ │ │ └── TransactionRepository.php │ │ │ │ ├── Responses │ │ │ │ │ └── ServiceResponse.php │ │ │ │ ├── Services │ │ │ │ │ ├── APIService.php │ │ │ │ │ ├── ChargeService.php │ │ │ │ │ ├── FactoryService.php │ │ │ │ │ ├── InstallmentService.php │ │ │ │ │ ├── InvoiceService.php │ │ │ │ │ ├── LocalizationService.php │ │ │ │ │ ├── LogService.php │ │ │ │ │ ├── MoneyService.php │ │ │ │ │ ├── OrderCreationService.php │ │ │ │ │ ├── OrderLogService.php │ │ │ │ │ ├── OrderService.php │ │ │ │ │ └── VersionService.php │ │ │ │ └── ValueObjects │ │ │ │ │ ├── AbstractValidString.php │ │ │ │ │ ├── CardBrand.php │ │ │ │ │ ├── ChargeStatus.php │ │ │ │ │ ├── Configuration │ │ │ │ │ ├── AddressAttributes.php │ │ │ │ │ ├── CardConfig.php │ │ │ │ │ ├── DebitConfig.php │ │ │ │ │ ├── GooglePayConfig.php │ │ │ │ │ ├── MarketplaceConfig.php │ │ │ │ │ ├── PixConfig.php │ │ │ │ │ ├── RecurrenceConfig.php │ │ │ │ │ └── VoucherConfig.php │ │ │ │ │ ├── Id │ │ │ │ │ ├── AccountId.php │ │ │ │ │ ├── ChargeId.php │ │ │ │ │ ├── CustomerId.php │ │ │ │ │ ├── CycleId.php │ │ │ │ │ ├── GUID.php │ │ │ │ │ ├── InvoiceId.php │ │ │ │ │ ├── MerchantId.php │ │ │ │ │ ├── OrderId.php │ │ │ │ │ ├── RecipientId.php │ │ │ │ │ ├── SubscriptionId.php │ │ │ │ │ └── TransactionId.php │ │ │ │ │ ├── Installment.php │ │ │ │ │ ├── InvoiceState.php │ │ │ │ │ ├── Key │ │ │ │ │ ├── AbstractPublicKey.php │ │ │ │ │ ├── AbstractSecretKey.php │ │ │ │ │ ├── HubAccessTokenKey.php │ │ │ │ │ ├── PublicKey.php │ │ │ │ │ ├── SecretKey.php │ │ │ │ │ ├── TestPublicKey.php │ │ │ │ │ └── TestSecretKey.php │ │ │ │ │ ├── NumericString.php │ │ │ │ │ ├── OrderState.php │ │ │ │ │ ├── OrderStatus.php │ │ │ │ │ ├── PaymentMethod.php │ │ │ │ │ ├── TransactionStatus.php │ │ │ │ │ ├── TransactionType.php │ │ │ │ │ └── VersionInfo.php │ │ │ ├── Maintenance │ │ │ │ ├── Assets │ │ │ │ │ └── integrityData │ │ │ │ ├── Interfaces │ │ │ │ │ ├── InfoRetrieverServiceInterface.php │ │ │ │ │ ├── InstallDataSourceInterface.php │ │ │ │ │ └── ModuleInstallTypeInterface.php │ │ │ │ └── Services │ │ │ │ │ ├── ConfigInfoRetrieverService.php │ │ │ │ │ ├── InfoBuilderService.php │ │ │ │ │ ├── InstallDataSource │ │ │ │ │ ├── AbstractInstallDataSource.php │ │ │ │ │ ├── ComposerInstallDataSource.php │ │ │ │ │ ├── CoreInstallDataSource.php │ │ │ │ │ └── ModmanInstallDataSource.php │ │ │ │ │ ├── IntegrityInfoRetrieverService.php │ │ │ │ │ ├── LogDownloadInfoRetrieverService.php │ │ │ │ │ ├── LogInfoRetrieverService.php │ │ │ │ │ ├── OrderInfoRetrieverService.php │ │ │ │ │ ├── PhpInfoRetrieverService.php │ │ │ │ │ └── VersionInfoRetrieverService.php │ │ │ ├── Marketplace │ │ │ │ ├── Aggregates │ │ │ │ │ ├── Recipient.php │ │ │ │ │ └── Split.php │ │ │ │ ├── Factories │ │ │ │ │ └── RecipientFactory.php │ │ │ │ ├── Interfaces │ │ │ │ │ └── RecipientInterface.php │ │ │ │ ├── Repositories │ │ │ │ │ └── RecipientRepository.php │ │ │ │ └── Services │ │ │ │ │ └── RecipientService.php │ │ │ ├── Middle │ │ │ │ ├── Client.php │ │ │ │ ├── Factory │ │ │ │ │ └── RecipientFactory.php │ │ │ │ ├── Interfaces │ │ │ │ │ ├── CardInterface.php │ │ │ │ │ └── ConvertToLegacyInterface.php │ │ │ │ ├── Model │ │ │ │ │ ├── Account.php │ │ │ │ │ ├── Account │ │ │ │ │ │ ├── PaymentEnum.php │ │ │ │ │ │ ├── PaymentMethodSettings.php │ │ │ │ │ │ ├── StoreSettings.php │ │ │ │ │ │ └── VoucherSettings.php │ │ │ │ │ ├── Address.php │ │ │ │ │ ├── Card.php │ │ │ │ │ ├── Common │ │ │ │ │ │ └── Document.php │ │ │ │ │ ├── Customer.php │ │ │ │ │ ├── Customer │ │ │ │ │ │ ├── Address.php │ │ │ │ │ │ └── Phones.php │ │ │ │ │ ├── Marketplace │ │ │ │ │ │ ├── BankAccount.php │ │ │ │ │ │ ├── BasePersonInformation.php │ │ │ │ │ │ ├── BaseRegisterInformation.php │ │ │ │ │ │ ├── CorporationRegisterInformation.php │ │ │ │ │ │ ├── IndividualRegisterInformation.php │ │ │ │ │ │ ├── ManagingPartner.php │ │ │ │ │ │ └── TransferSettings.php │ │ │ │ │ ├── ModelWithErrors.php │ │ │ │ │ ├── Phones.php │ │ │ │ │ └── Recipient.php │ │ │ │ └── Proxy │ │ │ │ │ ├── AccountProxy.php │ │ │ │ │ ├── CardProxy.php │ │ │ │ │ ├── CustomerProxy.php │ │ │ │ │ ├── RecipientProxy.php │ │ │ │ │ └── TdsTokenProxy.php │ │ │ ├── Payment │ │ │ │ ├── Aggregates │ │ │ │ │ ├── Address.php │ │ │ │ │ ├── Customer.php │ │ │ │ │ ├── Item.php │ │ │ │ │ ├── Order.php │ │ │ │ │ ├── Payments │ │ │ │ │ │ ├── AbstractCreditCardPayment.php │ │ │ │ │ │ ├── AbstractPayment.php │ │ │ │ │ │ ├── Authentication │ │ │ │ │ │ │ ├── Authentication.php │ │ │ │ │ │ │ ├── AuthenticationStatusEnum.php │ │ │ │ │ │ │ └── Type │ │ │ │ │ │ │ │ └── ThreeDSecure.php │ │ │ │ │ │ ├── BoletoPayment.php │ │ │ │ │ │ ├── GooglePayPayment.php │ │ │ │ │ │ ├── NewCreditCardPayment.php │ │ │ │ │ │ ├── NewDebitCardPayment.php │ │ │ │ │ │ ├── NewVoucherPayment.php │ │ │ │ │ │ ├── PixPayment.php │ │ │ │ │ │ ├── SavedCreditCardPayment.php │ │ │ │ │ │ ├── SavedDebitCardPayment.php │ │ │ │ │ │ └── SavedVoucherCardPayment.php │ │ │ │ │ ├── SavedCard.php │ │ │ │ │ └── Shipping.php │ │ │ │ ├── Factories │ │ │ │ │ ├── AddressFactory.php │ │ │ │ │ ├── CustomerFactory.php │ │ │ │ │ ├── PaymentFactory.php │ │ │ │ │ └── SavedCardFactory.php │ │ │ │ ├── Interfaces │ │ │ │ │ ├── ConvertibleToSDKRequestsInterface.php │ │ │ │ │ ├── HaveOrderInterface.php │ │ │ │ │ └── ResponseHandlerInterface.php │ │ │ │ ├── Repositories │ │ │ │ │ ├── CustomerRepository.php │ │ │ │ │ └── SavedCardRepository.php │ │ │ │ ├── Services │ │ │ │ │ ├── CardService.php │ │ │ │ │ ├── CustomerService.php │ │ │ │ │ ├── OrderService.php │ │ │ │ │ ├── ResponseHandlers │ │ │ │ │ │ ├── AbstractResponseHandler.php │ │ │ │ │ │ ├── ErrorExceptionHandler.php │ │ │ │ │ │ └── OrderHandler.php │ │ │ │ │ └── ValidationService.php │ │ │ │ ├── Traits │ │ │ │ │ ├── WithAmountTrait.php │ │ │ │ │ ├── WithCustomerTrait.php │ │ │ │ │ └── WithOrderTrait.php │ │ │ │ └── ValueObjects │ │ │ │ │ ├── AbstractCardIdentifier.php │ │ │ │ │ ├── BoletoBank.php │ │ │ │ │ ├── CardId.php │ │ │ │ │ ├── CardToken.php │ │ │ │ │ ├── CustomerPhones.php │ │ │ │ │ ├── CustomerType.php │ │ │ │ │ ├── Discounts.php │ │ │ │ │ ├── PaymentMethod.php │ │ │ │ │ ├── Phone.php │ │ │ │ │ └── PixBank.php │ │ │ ├── Recurrence │ │ │ │ ├── Aggregates │ │ │ │ │ ├── Charge.php │ │ │ │ │ ├── Cycle.php │ │ │ │ │ ├── Increment.php │ │ │ │ │ ├── Invoice.php │ │ │ │ │ ├── Plan.php │ │ │ │ │ ├── ProductSubscription.php │ │ │ │ │ ├── Repetition.php │ │ │ │ │ ├── SubProduct.php │ │ │ │ │ ├── Subscription.php │ │ │ │ │ └── SubscriptionItem.php │ │ │ │ ├── Factories │ │ │ │ │ ├── ChargeFactory.php │ │ │ │ │ ├── CycleFactory.php │ │ │ │ │ ├── InvoiceFactory.php │ │ │ │ │ ├── PlanFactory.php │ │ │ │ │ ├── ProductSubscriptionFactory.php │ │ │ │ │ ├── RepetitionFactory.php │ │ │ │ │ ├── SubProductFactory.php │ │ │ │ │ ├── SubscriptionFactory.php │ │ │ │ │ ├── SubscriptionItemFactory.php │ │ │ │ │ └── TreatFactoryChargeDataBase.php │ │ │ │ ├── Interfaces │ │ │ │ │ ├── ProductPlanInterface.php │ │ │ │ │ ├── ProductSubscriptionInterface.php │ │ │ │ │ ├── RecurrenceEntityInterface.php │ │ │ │ │ ├── RepetitionInterface.php │ │ │ │ │ └── SubProductEntityInterface.php │ │ │ │ ├── Repositories │ │ │ │ │ ├── ChargeRepository.php │ │ │ │ │ ├── PlanRepository.php │ │ │ │ │ ├── ProductSubscriptionRepository.php │ │ │ │ │ ├── RepetitionRepository.php │ │ │ │ │ ├── SubProductRepository.php │ │ │ │ │ ├── SubscriptionItemRepository.php │ │ │ │ │ └── SubscriptionRepository.php │ │ │ │ ├── Services │ │ │ │ │ ├── CartRules │ │ │ │ │ │ ├── CompatibleRecurrenceProducts.php │ │ │ │ │ │ ├── CurrentProduct.php │ │ │ │ │ │ ├── JustOneProductPlanInCart.php │ │ │ │ │ │ ├── JustProductPlanInCart.php │ │ │ │ │ │ ├── JustSelfProductPlanInCart.php │ │ │ │ │ │ ├── MoreThanOneRecurrenceProduct.php │ │ │ │ │ │ ├── NormalWithRecurrenceProduct.php │ │ │ │ │ │ ├── ProductListInCart.php │ │ │ │ │ │ └── RuleInterface.php │ │ │ │ │ ├── InvoiceService.php │ │ │ │ │ ├── PlanService.php │ │ │ │ │ ├── ProductSubscriptionService.php │ │ │ │ │ ├── RecurrenceService.php │ │ │ │ │ ├── RepetitionService.php │ │ │ │ │ ├── ResponseHandlers │ │ │ │ │ │ ├── AbstractResponseHandler.php │ │ │ │ │ │ ├── ChargeHandler.php │ │ │ │ │ │ ├── ErrorExceptionHandler.php │ │ │ │ │ │ └── SubscriptionHandler.php │ │ │ │ │ ├── RulesCheckoutService.php │ │ │ │ │ ├── SubProductService.php │ │ │ │ │ ├── SubscriptionItemService.php │ │ │ │ │ └── SubscriptionService.php │ │ │ │ └── ValueObjects │ │ │ │ │ ├── IntervalValueObject.php │ │ │ │ │ ├── InvoiceIdValueObject.php │ │ │ │ │ ├── InvoiceStatus.php │ │ │ │ │ ├── PlanId.php │ │ │ │ │ ├── PlanItemId.php │ │ │ │ │ ├── PricingSchemeValueObject.php │ │ │ │ │ ├── SubscriptionItemId.php │ │ │ │ │ └── SubscriptionStatus.php │ │ │ └── Webhook │ │ │ │ ├── Aggregates │ │ │ │ └── Webhook.php │ │ │ │ ├── Exceptions │ │ │ │ ├── UnprocessableWebhookException.php │ │ │ │ ├── WebhookAlreadyHandledException.php │ │ │ │ └── WebhookHandlerNotFoundException.php │ │ │ │ ├── Factories │ │ │ │ └── WebhookFactory.php │ │ │ │ ├── Repositories │ │ │ │ └── WebhookRepository.php │ │ │ │ ├── Services │ │ │ │ ├── AbstractHandlerService.php │ │ │ │ ├── ChargeHandlerService.php │ │ │ │ ├── ChargeOrderService.php │ │ │ │ ├── ChargeRecurrenceService.php │ │ │ │ ├── InvoiceHandlerService.php │ │ │ │ ├── InvoiceRecurrenceService.php │ │ │ │ ├── RecipientHandlerService.php │ │ │ │ ├── SubscriptionHandlerService.php │ │ │ │ └── WebhookReceiverService.php │ │ │ │ └── ValueObjects │ │ │ │ ├── WebhookId.php │ │ │ │ └── WebhookType.php │ │ └── tests │ │ │ ├── Abstractions │ │ │ ├── AbstractRepositoryTest.php │ │ │ └── AbstractSetupTest.php │ │ │ ├── Hub │ │ │ ├── Aggregates │ │ │ │ └── InstallTokenTests.php │ │ │ └── Factories │ │ │ │ └── HubCommandFactoryTest.php │ │ │ ├── Kernel │ │ │ ├── Aggregates │ │ │ │ ├── ChargeTests.php │ │ │ │ ├── ConfigurationTests.php │ │ │ │ └── LogObjectTests.php │ │ │ ├── Factories │ │ │ │ └── Configurations │ │ │ │ │ └── PixConfigFactoryTest.php │ │ │ ├── I18N │ │ │ │ └── PTBRTests.php │ │ │ ├── Response │ │ │ │ └── ServiceResponseTest.php │ │ │ ├── Services │ │ │ │ └── MoneyServiceTests.php │ │ │ └── ValueObjects │ │ │ │ ├── AbstractValidStringTest.php │ │ │ │ ├── CardBrandTest.php │ │ │ │ ├── ChargeStatusTest.php │ │ │ │ ├── Id │ │ │ │ ├── AccountIdTest.php │ │ │ │ ├── ChargeIdTest.php │ │ │ │ ├── CustomerIdTest.php │ │ │ │ ├── CycleIdTest.php │ │ │ │ ├── GUIDTest.php │ │ │ │ ├── InvoiceIdTest.php │ │ │ │ ├── MerchantIdTest.php │ │ │ │ ├── OrderIdTest.php │ │ │ │ ├── SubscriptionIdTest.php │ │ │ │ └── TransactionIdTest.php │ │ │ │ ├── InstallmentTest.php │ │ │ │ ├── InvoiceStateTest.php │ │ │ │ ├── Key │ │ │ │ ├── HubAccessTokenKeyTest.php │ │ │ │ ├── PublicKeyTest.php │ │ │ │ ├── SecretKeyTest.php │ │ │ │ ├── TestPublicKeyTest.php │ │ │ │ └── TestSecretKeyTest.php │ │ │ │ ├── NumericStringTest.php │ │ │ │ ├── OrderStateTest.php │ │ │ │ ├── OrderStatusTest.php │ │ │ │ ├── TransactionStatusTest.php │ │ │ │ ├── TransactionTypeTest.php │ │ │ │ ├── ValidStringTestTrait.php │ │ │ │ └── VersionInfoTest.php │ │ │ ├── Maintenance │ │ │ └── Services │ │ │ │ └── InstallDataSource │ │ │ │ └── CoreInstallDataSourceTests.php │ │ │ ├── Marketplace │ │ │ ├── Aggregates │ │ │ │ ├── RecipientTest.php │ │ │ │ └── SplitTest.php │ │ │ └── Factories │ │ │ │ └── RecipientFactoryTest.php │ │ │ ├── Middle │ │ │ └── Factory │ │ │ │ └── RecipientFactoryTest.php │ │ │ ├── Payment │ │ │ ├── Aggregates │ │ │ │ ├── AddressTests.php │ │ │ │ └── CustomerTests.php │ │ │ └── ValueObjects │ │ │ │ └── PhoneTests.php │ │ │ ├── Recurrence │ │ │ ├── Aggregates │ │ │ │ ├── ChargeTest.php │ │ │ │ ├── CycleTest.php │ │ │ │ ├── IncrementTest.php │ │ │ │ ├── InvoiceTest.php │ │ │ │ ├── PlanTest.php │ │ │ │ ├── ProductSubscriptionTest.php │ │ │ │ ├── RepetitionTest.php │ │ │ │ ├── SubProductTest.php │ │ │ │ └── SubscriptionTest.php │ │ │ ├── Factories │ │ │ │ ├── ChargeFactoryTest.php │ │ │ │ ├── CycleFactoryTest.php │ │ │ │ ├── PlanTest.php │ │ │ │ ├── ProductSubscriptionFactoryTest.php │ │ │ │ ├── RepetitionFactoryTest.php │ │ │ │ └── SubProductTest.php │ │ │ ├── Repositories │ │ │ │ ├── ProductSubscriptionRepositoryTest.php │ │ │ │ ├── RepetitionRepositoryTest.php │ │ │ │ └── SubProductRepositoryTest.php │ │ │ ├── Services │ │ │ │ ├── CartRules │ │ │ │ │ ├── CompatibleRecurrenceProductsTest.php │ │ │ │ │ ├── CurrentProductTest.php │ │ │ │ │ ├── MoreThanOneRecurrenceProductTest.php │ │ │ │ │ ├── NormalWithRecurrenceProductTest.php │ │ │ │ │ └── ProductListInCartTest.php │ │ │ │ ├── InvoiceServiceTest.php │ │ │ │ ├── ProductSubscriptionServiceTest.php │ │ │ │ ├── RecurrenceServiceTest.php │ │ │ │ └── RulesCheckoutServiceTest.php │ │ │ └── ValueObjects │ │ │ │ ├── IntervalValueObjectTest.php │ │ │ │ ├── PlanIdTest.php │ │ │ │ ├── PricingSchemeValueObjectTest.php │ │ │ │ └── SubscriptionStatusTest.php │ │ │ ├── Webhook │ │ │ ├── Aggregates │ │ │ │ └── WebhookTest.php │ │ │ ├── Services │ │ │ │ └── RecipientHandlerServiceTest.php │ │ │ └── ValueObjects │ │ │ │ └── WebhookIdTests.php │ │ │ └── mock │ │ │ ├── Concrete │ │ │ ├── Migrate.php │ │ │ ├── PlatformCoreSetup.php │ │ │ └── PlatformDatabaseDecorator.php │ │ │ └── ValidStringMock.php │ └── pagarmecoreapi │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ ├── examples │ │ ├── address │ │ │ └── createAddress.php │ │ ├── card │ │ │ ├── createCard.php │ │ │ └── getCards.php │ │ ├── charges │ │ │ ├── cancelCharge.php │ │ │ ├── cancelChargePartial.php │ │ │ ├── captureCharge.php │ │ │ ├── captureChargePartial.php │ │ │ ├── getChargeById.php │ │ │ └── retryCharge.php │ │ ├── customer │ │ │ ├── createCustomer.php │ │ │ ├── getCustomerById.php │ │ │ └── updateCustomer.php │ │ ├── invoice │ │ │ └── getInvoiceById.php │ │ ├── marketplace │ │ │ ├── createAnticipation.php │ │ │ ├── createRecipient.php │ │ │ ├── createSplit.php │ │ │ └── createTransfer.php │ │ ├── order │ │ │ ├── createOrderBankTransfer.php │ │ │ ├── createOrderBoleto.php │ │ │ ├── createOrderCheckout.php │ │ │ ├── createOrderCreditCard.php │ │ │ ├── createOrderDebitCard.php │ │ │ ├── createOrderVoucher.php │ │ │ └── getOrderById.php │ │ ├── plan │ │ │ └── createPlan.php │ │ └── subscription │ │ │ ├── cancelSubscription.php │ │ │ ├── createSubscriptionPrepaidBoleto.php │ │ │ ├── createSubscriptionPrepaidCreditCard.php │ │ │ ├── getSubscriptionById.php │ │ │ └── updateSubscriptionCard.php │ │ └── src │ │ ├── APIException.php │ │ ├── APIHelper.php │ │ ├── Configuration.php │ │ ├── Controllers │ │ ├── AccountsController.php │ │ ├── BaseController.php │ │ ├── ChargesController.php │ │ ├── CustomersController.php │ │ ├── InvoicesController.php │ │ ├── OrdersController.php │ │ ├── PlansController.php │ │ ├── RecipientsController.php │ │ ├── SellersController.php │ │ ├── SubscriptionsController.php │ │ ├── TdsTokenController.php │ │ ├── TokensController.php │ │ ├── TransactionsController.php │ │ └── TransfersController.php │ │ ├── Exceptions │ │ └── ErrorException.php │ │ ├── Http │ │ ├── HttpCallBack.php │ │ ├── HttpContext.php │ │ ├── HttpMethod.php │ │ ├── HttpRequest.php │ │ └── HttpResponse.php │ │ ├── Models │ │ ├── CancelSplitRequest.php │ │ ├── CreateAccessTokenRequest.php │ │ ├── CreateAddressRequest.php │ │ ├── CreateAnticipationRequest.php │ │ ├── CreateAntifraudRequest.php │ │ ├── CreateApplePayHeaderRequest.php │ │ ├── CreateApplePayRequest.php │ │ ├── CreateAutomaticAnticipationSettingsRequest.php │ │ ├── CreateBankAccountRequest.php │ │ ├── CreateBankTransferPaymentRequest.php │ │ ├── CreateBoletoPaymentRequest.php │ │ ├── CreateCancelChargeRequest.php │ │ ├── CreateCancelChargeSplitRulesRequest.php │ │ ├── CreateCancelSubscriptionRequest.php │ │ ├── CreateCaptureChargeRequest.php │ │ ├── CreateCardOptionsRequest.php │ │ ├── CreateCardPaymentContactlessPOIRequest.php │ │ ├── CreateCardPaymentContactlessRequest.php │ │ ├── CreateCardRequest.php │ │ ├── CreateCardTokenRequest.php │ │ ├── CreateCashPaymentRequest.php │ │ ├── CreateChargeRequest.php │ │ ├── CreateCheckoutBankTransferRequest.php │ │ ├── CreateCheckoutBoletoPaymentRequest.php │ │ ├── CreateCheckoutCardInstallmentOptionRequest.php │ │ ├── CreateCheckoutCreditCardPaymentRequest.php │ │ ├── CreateCheckoutDebitCardPaymentRequest.php │ │ ├── CreateCheckoutPaymentRequest.php │ │ ├── CreateCheckoutPixPaymentRequest.php │ │ ├── CreateClearSaleRequest.php │ │ ├── CreateConfirmPaymentRequest.php │ │ ├── CreateCreditCardPaymentRequest.php │ │ ├── CreateCustomerRequest.php │ │ ├── CreateDebitCardPaymentRequest.php │ │ ├── CreateDeviceRequest.php │ │ ├── CreateDiscountRequest.php │ │ ├── CreateEmvDataDecryptRequest.php │ │ ├── CreateEmvDataDukptDecryptRequest.php │ │ ├── CreateEmvDataTlvDecryptRequest.php │ │ ├── CreateEmvDecryptRequest.php │ │ ├── CreateFineRequest.php │ │ ├── CreateGooglePayHeaderRequest.php │ │ ├── CreateGooglePayPaymentRequest.php │ │ ├── CreateGooglePayRequest.php │ │ ├── CreateIncrementRequest.php │ │ ├── CreateInterestRequest.php │ │ ├── CreateInvoiceRequest.php │ │ ├── CreateKycLinkResponse.php │ │ ├── CreateLocationRequest.php │ │ ├── CreateOrderItemRequest.php │ │ ├── CreateOrderRequest.php │ │ ├── CreatePaymentAuthenticationRequest.php │ │ ├── CreatePaymentRequest.php │ │ ├── CreatePeriodRequest.php │ │ ├── CreatePhoneRequest.php │ │ ├── CreatePhonesRequest.php │ │ ├── CreatePixPaymentRequest.php │ │ ├── CreatePlanItemRequest.php │ │ ├── CreatePlanRequest.php │ │ ├── CreatePriceBracketRequest.php │ │ ├── CreatePricingSchemeRequest.php │ │ ├── CreatePrivateLabelPaymentRequest.php │ │ ├── CreateRecipientRequest.php │ │ ├── CreateRegisterInformationAddressRequest.php │ │ ├── CreateRegisterInformationBaseRequest.php │ │ ├── CreateRegisterInformationCorporationRequest.php │ │ ├── CreateRegisterInformationIndividualRequest.php │ │ ├── CreateRegisterInformationPhoneRequest.php │ │ ├── CreateSellerRequest.php │ │ ├── CreateSetupRequest.php │ │ ├── CreateShippingRequest.php │ │ ├── CreateSplitOptionsRequest.php │ │ ├── CreateSplitRequest.php │ │ ├── CreateSubMerchantRequest.php │ │ ├── CreateSubscriptionItemRequest.php │ │ ├── CreateSubscriptionRequest.php │ │ ├── CreateSubscriptionSplitRequest.php │ │ ├── CreateThreeDSecureRequest.php │ │ ├── CreateTokenRequest.php │ │ ├── CreateTransactionReportFileRequest.php │ │ ├── CreateTransfer.php │ │ ├── CreateTransferRequest.php │ │ ├── CreateTransferSettingsRequest.php │ │ ├── CreateUsageRequest.php │ │ ├── CreateVoucherPaymentRequest.php │ │ ├── CreateWithdrawRequest.php │ │ ├── GetAccessTokenResponse.php │ │ ├── GetAccountResponse.php │ │ ├── GetAddressResponse.php │ │ ├── GetAnticipationLimitResponse.php │ │ ├── GetAnticipationLimitsResponse.php │ │ ├── GetAnticipationResponse.php │ │ ├── GetAntifraudResponse.php │ │ ├── GetAutomaticAnticipationResponse.php │ │ ├── GetBalanceResponse.php │ │ ├── GetBankAccountResponse.php │ │ ├── GetBankTransferTransactionResponse.php │ │ ├── GetBillingAddressResponse.php │ │ ├── GetBoletoTransactionResponse.php │ │ ├── GetCardResponse.php │ │ ├── GetCardTokenResponse.php │ │ ├── GetCashTransactionResponse.php │ │ ├── GetChargeResponse.php │ │ ├── GetChargesSummaryResponse.php │ │ ├── GetCheckoutBankTransferPaymentResponse.php │ │ ├── GetCheckoutBoletoPaymentResponse.php │ │ ├── GetCheckoutCardInstallmentOptionsResponse.php │ │ ├── GetCheckoutCreditCardPaymentResponse.php │ │ ├── GetCheckoutDebitCardPaymentResponse.php │ │ ├── GetCheckoutPaymentResponse.php │ │ ├── GetCheckoutPaymentSettingsResponse.php │ │ ├── GetCheckoutPixPaymentResponse.php │ │ ├── GetCreditCardTransactionResponse.php │ │ ├── GetCustomerResponse.php │ │ ├── GetDebitCardTransactionResponse.php │ │ ├── GetDeviceResponse.php │ │ ├── GetDiscountResponse.php │ │ ├── GetFineResponse.php │ │ ├── GetGatewayErrorResponse.php │ │ ├── GetGatewayRecipientResponse.php │ │ ├── GetGatewayResponseResponse.php │ │ ├── GetIncrementResponse.php │ │ ├── GetInterestResponse.php │ │ ├── GetInvoiceItemResponse.php │ │ ├── GetInvoiceResponse.php │ │ ├── GetLocationResponse.php │ │ ├── GetOrderItemResponse.php │ │ ├── GetOrderResponse.php │ │ ├── GetPaymentAuthenticationResponse.php │ │ ├── GetPeriodResponse.php │ │ ├── GetPhoneResponse.php │ │ ├── GetPhonesResponse.php │ │ ├── GetPixBankAccountResponse.php │ │ ├── GetPixPayerResponse.php │ │ ├── GetPixTransactionResponse.php │ │ ├── GetPlanItemResponse.php │ │ ├── GetPlanResponse.php │ │ ├── GetPriceBracketResponse.php │ │ ├── GetPricingSchemeResponse.php │ │ ├── GetPrivateLabelTransactionResponse.php │ │ ├── GetRecipientAddressResponse.php │ │ ├── GetRecipientKycDetailsResponse.php │ │ ├── GetRecipientManagingPartnersResponse.php │ │ ├── GetRecipientPhonesResponse.php │ │ ├── GetRecipientRegisterInformationResponse.php │ │ ├── GetRecipientResponse.php │ │ ├── GetSafetyPayTransactionResponse.php │ │ ├── GetSellerResponse.php │ │ ├── GetSellersRequest.php │ │ ├── GetSetupResponse.php │ │ ├── GetShippingResponse.php │ │ ├── GetSplitOptionsResponse.php │ │ ├── GetSplitResponse.php │ │ ├── GetSubscriptionItemResponse.php │ │ ├── GetSubscriptionResponse.php │ │ ├── GetSubscriptionSplitResponse.php │ │ ├── GetTdsTokenResponse.php │ │ ├── GetThreeDSecureResponse.php │ │ ├── GetTokenResponse.php │ │ ├── GetTransactionReportFileResponse.php │ │ ├── GetTransactionResponse.php │ │ ├── GetTransfer.php │ │ ├── GetTransferResponse.php │ │ ├── GetTransferSettingsResponse.php │ │ ├── GetTransferSourceResponse.php │ │ ├── GetTransferTargetResponse.php │ │ ├── GetUsageReportResponse.php │ │ ├── GetUsageResponse.php │ │ ├── GetUsagesDetailsResponse.php │ │ ├── GetVoucherTransactionResponse.php │ │ ├── GetWithdrawResponse.php │ │ ├── GetWithdrawSourceResponse.php │ │ ├── GetWithdrawTargetResponse.php │ │ ├── ListAccessTokensResponse.php │ │ ├── ListAddressesResponse.php │ │ ├── ListAnticipationResponse.php │ │ ├── ListCardsResponse.php │ │ ├── ListChargeTransactionsResponse.php │ │ ├── ListChargesResponse.php │ │ ├── ListCustomersResponse.php │ │ ├── ListCyclesResponse.php │ │ ├── ListDiscountsResponse.php │ │ ├── ListIncrementsResponse.php │ │ ├── ListInvoicesResponse.php │ │ ├── ListOrderResponse.php │ │ ├── ListPlansResponse.php │ │ ├── ListRecipientResponse.php │ │ ├── ListSellerResponse.php │ │ ├── ListSubscriptionItemsResponse.php │ │ ├── ListSubscriptionsResponse.php │ │ ├── ListTransactionsFilesResponse.php │ │ ├── ListTransactionsResponse.php │ │ ├── ListTransferResponse.php │ │ ├── ListTransfers.php │ │ ├── ListUsagesDetailsResponse.php │ │ ├── ListUsagesResponse.php │ │ ├── ListWithdrawals.php │ │ ├── PagingResponse.php │ │ ├── PixAdditionalInformation.php │ │ ├── UpdateAddressRequest.php │ │ ├── UpdateAutomaticAnticipationSettingsRequest.php │ │ ├── UpdateCardRequest.php │ │ ├── UpdateChargeCardRequest.php │ │ ├── UpdateChargeDueDateRequest.php │ │ ├── UpdateChargePaymentMethodRequest.php │ │ ├── UpdateCurrentCycleEndDateRequest.php │ │ ├── UpdateCurrentCycleStatusRequest.php │ │ ├── UpdateCustomerRequest.php │ │ ├── UpdateInvoiceStatusRequest.php │ │ ├── UpdateMetadataRequest.php │ │ ├── UpdateOrderItemRequest.php │ │ ├── UpdateOrderStatusRequest.php │ │ ├── UpdatePlanItemRequest.php │ │ ├── UpdatePlanRequest.php │ │ ├── UpdatePriceBracketRequest.php │ │ ├── UpdatePricingSchemeRequest.php │ │ ├── UpdateRecipientBankAccountRequest.php │ │ ├── UpdateRecipientRequest.php │ │ ├── UpdateSellerRequest.php │ │ ├── UpdateSubscriptionAffiliationIdRequest.php │ │ ├── UpdateSubscriptionBillingDateRequest.php │ │ ├── UpdateSubscriptionCardRequest.php │ │ ├── UpdateSubscriptionDueDaysRequest.php │ │ ├── UpdateSubscriptionItemRequest.php │ │ ├── UpdateSubscriptionMinimumPriceRequest.php │ │ ├── UpdateSubscriptionPaymentMethodRequest.php │ │ ├── UpdateSubscriptionSplitRequest.php │ │ ├── UpdateSubscriptionStartAtRequest.php │ │ └── UpdateTransferSettingsRequest.php │ │ ├── PagarmeCoreApiClient.php │ │ └── Utils │ │ └── DateTimeHelper.php └── psr │ └── log │ ├── LICENSE │ ├── Psr │ └── Log │ │ ├── AbstractLogger.php │ │ ├── InvalidArgumentException.php │ │ ├── LogLevel.php │ │ ├── LoggerAwareInterface.php │ │ ├── LoggerAwareTrait.php │ │ ├── LoggerInterface.php │ │ ├── LoggerTrait.php │ │ ├── NullLogger.php │ │ └── Test │ │ ├── DummyTest.php │ │ ├── LoggerInterfaceTest.php │ │ └── TestLogger.php │ ├── README.md │ └── composer.json ├── webpack.config.js └── woo-pagarme-payments.php /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_style = space 8 | indent_size = 4 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug 3 | about: Reporte de bugs 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | # Bug 11 | 12 | ### Descrição 13 | Descreva detalhadamente o bug. 14 | 15 | ### Como reproduzir 16 | Descreva os passos para reproduzir o bug. 17 | 18 | ### Evidências 19 | Colocar aqui as evidências do bug. 20 | 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Nova funcionalidade 3 | about: Solicitação de novas funcionalidades 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | # Nova funcionalidade 11 | 12 | ### Descrição 13 | Descreva detalhadamente a nova funcionalidade. 14 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/master.md: -------------------------------------------------------------------------------- 1 | ## :sparkles: New Features 2 | - 3 | 4 | ## :bug: Bug fixes 5 | - 6 | 7 | ## :rocket: Improvements 8 | - 9 | -------------------------------------------------------------------------------- /.github/README.md: -------------------------------------------------------------------------------- 1 | ../docs/README.md -------------------------------------------------------------------------------- /.github/data/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG WORDPRESS_IMAGE_VERSION=latest 2 | FROM wordpress:$WORDPRESS_IMAGE_VERSION 3 | MAINTAINER Open Source Team 4 | 5 | WORKDIR /var/www/html/ 6 | 7 | RUN apt-get update \ 8 | && apt-get install wget -y \ 9 | && apt-get clean 10 | 11 | RUN wget https://github.com/DataDog/dd-trace-php/releases/latest/download/datadog-setup.php -O datadog-setup.php 12 | 13 | RUN php datadog-setup.php --php-bin=all --enable-appsec 14 | 15 | COPY . ./wp-content 16 | 17 | COPY plugins/pagarme-payments-for-woocommerce/.github/data/custom.ini $PHP_INI_DIR/conf.d/ 18 | -------------------------------------------------------------------------------- /.github/data/custom.ini: -------------------------------------------------------------------------------- 1 | file_uploads = On 2 | upload_max_filesize = 200M 3 | post_max_size = 200M 4 | max_execution_time = 600 5 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ![Git Merge](https://media.giphy.com/media/cFkiFMDg3iFoI/giphy.gif) 2 | 3 | > [!IMPORTANT] 4 | > Certifique-se de criar o PR para a branch **develop**. 5 | 6 | ### Qual o tipo de PR é esse? (marque todos os aplicáveis) 7 | - [ ] Refatoração 8 | - [ ] Adição de funcionalidade 9 | - [ ] Correção de bug 10 | - [ ] Otimização 11 | - [ ] Atualização de documentação 12 | 13 | ### Descrição 14 | Descreva brevemente as alterações feitas neste PR. 15 | 16 | 17 | ### Cenários testados 18 | Descreva brevemente quais foram os cenários testados com as alterações feitas neste PR. 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.lock 2 | *.log 3 | *.orig 4 | .sass-cache 5 | package-lock.json 6 | node_modules/ 7 | .idea/ 8 | .vscode/ 9 | .phpunit.result.cache 10 | .phpunit.cache/ 11 | vendor/antecedent/ 12 | vendor/bin/ 13 | vendor/brain/ 14 | vendor/composer/autoload_files.php 15 | vendor/hamcrest/ 16 | vendor/mockery/ 17 | vendor/myclabs/ 18 | vendor/nikic/ 19 | vendor/phar-io/ 20 | vendor/phpunit/ 21 | vendor/sebastian/ 22 | vendor/theseer/ 23 | vendor/wordpress/ 24 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | # BEGIN WordPress 2 | 3 | RewriteEngine On 4 | RewriteBase / 5 | RewriteRule ^index\.php$ - [L] 6 | RewriteCond %{REQUEST_FILENAME} !-f 7 | RewriteCond %{REQUEST_FILENAME} !-d 8 | RewriteRule . /index.php [L] 9 | 10 | # END WordPress -------------------------------------------------------------------------------- /.jshintignore: -------------------------------------------------------------------------------- 1 | assets/javascripts/libs/* 2 | assets/javascripts/vendor/* 3 | assets/javascripts/admin/libs/* 4 | assets/javascripts/admin/vendor/* 5 | assets/javascripts/front/libs/* 6 | assets/javascripts/front/vendor/* -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "laxcomma" : true, 3 | "latedef" : true, 4 | "browser" : true, 5 | "eqnull" : true, 6 | "curly" : true, 7 | "undef" : true, 8 | "noarg" : true, 9 | "immed" : true, 10 | "expr" : true, 11 | "sub" : true, 12 | "globals" : { 13 | "MONSTER" : true, 14 | "PagarmeGlobalVars" : true, 15 | "PagarmeCheckout" : true, 16 | "Pagarme" : true, 17 | "console" : true, 18 | "jQuery" : true, 19 | "Toastr" : true, 20 | "swal" : true, 21 | "wp" : true, 22 | "$" : true 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM thiagobarradas/woocommerce:3.5.3-wp5.0.2-php7.2 2 | MAINTAINER Open Source Team 3 | 4 | COPY . /app/wp-content/plugins/woo-pagarme-payments 5 | RUN mv /app/wp-content/plugins/woo-pagarme-payments/.htaccess /app/.htaccess 6 | WORKDIR /app 7 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | require('load-grunt-tasks')(grunt); 3 | require('time-grunt')(grunt); 4 | 5 | var options = { 6 | data: { 7 | paths: { 8 | style: 'assets/stylesheets', 9 | js: 'assets/javascripts', 10 | } 11 | } 12 | }; 13 | 14 | require('load-grunt-config')(grunt, options); 15 | 16 | grunt.registerTask('default', ['concurrent:dev']); 17 | grunt.registerTask('deploy', ['concurrent:dist', 'uglify']); 18 | }; 19 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | sonar: 2 | docker run -ti -v $(shell pwd):/usr/src/ pagarme/sonar-scanner -Dsonar.branch.name=${BRANCH} 3 | .PHONY: sonar 4 | 5 | sonar-check-quality-gate: 6 | docker run -v $(shell pwd):/usr/src/sonar pagarme/check-sonar-quality-gate 7 | .PHONY: sonar-check-quality-gate 8 | -------------------------------------------------------------------------------- /assets/images/pagarme-avatar-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/pagarme-avatar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/javascripts/admin/index.php: -------------------------------------------------------------------------------- 1 | { // Safari is blocking any call to window.open() which is made inside an async call. 4 | window.open(jQuery(this).attr('data-pagarme-billet-url'), '_blank'); 5 | }); 6 | }); 7 | -------------------------------------------------------------------------------- /assets/javascripts/front/checkout/model/payment/card/initTds.js: -------------------------------------------------------------------------------- 1 | const initTds = { 2 | callTdsFunction(tdsToken, tdsData, callbackTds) { 3 | const challengeWindowSize = "03"; 4 | Script3ds.init3ds(tdsToken, tdsData, callbackTds, challengeWindowSize); 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /assets/javascripts/front/checkout/model/payment/card/tdsToken.js: -------------------------------------------------------------------------------- 1 | const pagarmeTdsToken = { 2 | FAIL_GET_TOKEN: "fail_get_token", 3 | 4 | getToken: () => { 5 | try { 6 | const response = jQuery.ajax({ 7 | type: "GET", 8 | dataType: "json", 9 | url: "/wc-api/pagarme-tds-token", 10 | async: false, 11 | cache: false, 12 | }).responseText; 13 | 14 | if (response.length === 0) { 15 | return { 16 | error: this.FAIL_GET_TOKEN, 17 | }; 18 | } 19 | 20 | const parsedResponse = JSON.parse(response); 21 | 22 | return { token: parsedResponse?.data?.token }; 23 | } catch (e) { 24 | return { 25 | error: this.FAIL_GET_TOKEN, 26 | }; 27 | } 28 | }, 29 | }; 30 | -------------------------------------------------------------------------------- /assets/javascripts/front/checkout/model/payment/two-cards.js: -------------------------------------------------------------------------------- 1 | /* globals wc_pagarme_checkout */ 2 | 3 | (function ($) { 4 | } (jQuery) 5 | ); 6 | -------------------------------------------------------------------------------- /assets/javascripts/front/checkout/model/payment/voucher.js: -------------------------------------------------------------------------------- 1 | jQuery(function ($) { 2 | }); 3 | -------------------------------------------------------------------------------- /assets/javascripts/front/index.php: -------------------------------------------------------------------------------- 1 | { 3 | const filterHandler = (inputValue) => { 4 | cards.filter((option) => 5 | option.label.toLowerCase().startsWith(inputValue.toLowerCase()), 6 | ); 7 | }; 8 | 9 | const cardChangeHandler = (value) => { 10 | setSelectCard(cardIndex, value); 11 | if (!cards) { 12 | return; 13 | } 14 | const foundedCard = cards.find((card) => card.value === value); 15 | if (foundedCard) { 16 | setBrand(cardIndex, foundedCard.brand); 17 | return; 18 | } 19 | setBrand(cardIndex, ""); 20 | }; 21 | 22 | return { 23 | filterHandler, 24 | cardChangeHandler, 25 | }; 26 | }; 27 | 28 | export default useWallet; 29 | -------------------------------------------------------------------------------- /assets/javascripts/front/reactCheckout/payments/Card/inputs/utils/cardNumberFormatter.js: -------------------------------------------------------------------------------- 1 | /* jshint esversion: 6 */ 2 | export function formatCardNumber(number) { 3 | return number.replace(/\D/g, ""); 4 | } 5 | -------------------------------------------------------------------------------- /assets/javascripts/front/reactCheckout/payments/Card/inputs/utils/expirationDate.js: -------------------------------------------------------------------------------- 1 | export function getMonthAndYearFromExpirationDate(date) { 2 | return date.replace(/\s/g, "").split("/"); 3 | } 4 | -------------------------------------------------------------------------------- /assets/javascripts/front/reactCheckout/payments/Card/inputs/utils/installmentsFormatter.js: -------------------------------------------------------------------------------- 1 | /* jshint esversion: 6 */ 2 | const { formatPrice } = window.wc.priceFormat; 3 | 4 | const formatInstallmentLabel = ({ 5 | optionLabel, 6 | finalPrice, 7 | value, 8 | extraText, 9 | installmentPrice, 10 | }) => { 11 | const formatedPrice = formatPrice(installmentPrice); 12 | const formatedFinalPrice = formatPrice(finalPrice); 13 | if (value === 1) { 14 | return `${value}x ${optionLabel} ${formatedPrice}`; 15 | } 16 | 17 | return `${value}x ${optionLabel} ${formatedPrice} (${formatedFinalPrice}) ${extraText}`.trim(); 18 | }; 19 | 20 | const formatInstallmentsOptions = (installments) => { 21 | return installments.map((installment) => { 22 | return { 23 | label: formatInstallmentLabel(installment), 24 | value: installment.value, 25 | }; 26 | }); 27 | }; 28 | 29 | export default formatInstallmentsOptions; 30 | -------------------------------------------------------------------------------- /assets/javascripts/front/reactCheckout/payments/Card/token/tokenizeException.js: -------------------------------------------------------------------------------- 1 | export default class TokenizeException extends Error { 2 | constructor(message) { 3 | super(message); 4 | this.name = this.constructor.name; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /assets/javascripts/front/reactCheckout/payments/Common/hooks/usePrevious.js: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef } from "@wordpress/element"; 2 | 3 | const usePrevious = (value) => { 4 | const ref = useRef(); 5 | useEffect(() => { 6 | ref.current = value; 7 | }); 8 | return ref.current; 9 | }; 10 | 11 | export default usePrevious; 12 | -------------------------------------------------------------------------------- /assets/javascripts/front/reactCheckout/payments/GooglePay/validateBilling.js: -------------------------------------------------------------------------------- 1 | 2 | function validateBilling(billing) { 3 | 4 | const requiredFields = [ 5 | 'first_name', 6 | 'last_name', 7 | 'email', 8 | 'phone', 9 | 'address_1', 10 | 'city', 11 | 'postcode', 12 | 'state', 13 | 'country' 14 | ]; 15 | for (const field of requiredFields) { 16 | if (!billing[field]) { 17 | return false; 18 | } 19 | } 20 | return true; 21 | } 22 | 23 | export default validateBilling; -------------------------------------------------------------------------------- /assets/javascripts/front/reactCheckout/payments/PaymentWithInstructions/usePaymentWithInstructions.js: -------------------------------------------------------------------------------- 1 | import { useEffect } from "@wordpress/element"; 2 | 3 | const usePaymentWithInstructions = ( 4 | emitResponse, 5 | eventRegistration, 6 | backendConfig, 7 | ) => { 8 | const { onPaymentSetup } = eventRegistration; 9 | 10 | useEffect(() => { 11 | return onPaymentSetup(() => { 12 | const paymentMethodData = { 13 | payment_method: backendConfig.key, 14 | }; 15 | 16 | return { 17 | type: emitResponse.responseTypes.SUCCESS, 18 | meta: { 19 | paymentMethodData, 20 | }, 21 | }; 22 | }); 23 | }, [onPaymentSetup, backendConfig]); 24 | }; 25 | 26 | export default usePaymentWithInstructions; 27 | -------------------------------------------------------------------------------- /assets/javascripts/index.php: -------------------------------------------------------------------------------- 1 | array('wp-element'), 'version' => '29216108959f084eaadb'); 2 | -------------------------------------------------------------------------------- /build/credit_card.asset.php: -------------------------------------------------------------------------------- 1 | array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-element'), 'version' => 'c6f2b0933611ba9b030b'); 2 | -------------------------------------------------------------------------------- /build/pix.asset.php: -------------------------------------------------------------------------------- 1 | array('wp-element'), 'version' => 'f1926351f29ec1d19fec'); 2 | -------------------------------------------------------------------------------- /constants.php: -------------------------------------------------------------------------------- 1 | { 2 | await page.getByLabel('Card Holder Name *').fill(creditCardName); 3 | await page.getByPlaceholder('•••• •••• •••• ••••').fill(creditCardNumber); 4 | } 5 | 6 | const informCvvAndExpirationDate = async (page, expirationDate, cvvNumber) => { 7 | await page.getByPlaceholder('MM / YY').fill(expirationDate); 8 | await page.getByPlaceholder('CVV').fill(cvvNumber); 9 | } 10 | 11 | module.exports = { 12 | informCreditCardInfo, 13 | informCvvAndExpirationDate 14 | } 15 | -------------------------------------------------------------------------------- /grunt/concat.js: -------------------------------------------------------------------------------- 1 | function getScriptsConcat(folder) { 2 | return { 3 | src : [ 4 | '<%= paths.js %>/libs/*.js', 5 | '<%= paths.js %>/' + folder + '/libs/*.js', 6 | '<%= paths.js %>/vendor/*.js', 7 | '<%= paths.js %>/' + folder + '/vendor/*.js', 8 | '<%= paths.js %>/' + folder + 'templates/*.js', 9 | '<%= paths.js %>/' + folder + '/app/*.js', 10 | '<%= paths.js %>/boot.js' 11 | ], 12 | dest : '<%= paths.js %>/' + folder + '/built.js', 13 | }; 14 | } 15 | 16 | module.exports = { 17 | 18 | options : { 19 | separator : ';' 20 | }, 21 | 22 | admin : getScriptsConcat( 'admin' ), 23 | front : getScriptsConcat( 'front' ) 24 | }; -------------------------------------------------------------------------------- /grunt/concurrent.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | dist : [ 3 | 'concat', 'sass:dist' 4 | ], 5 | dev : [ 6 | 'concat', 'sass:dev' 7 | ] 8 | }; -------------------------------------------------------------------------------- /grunt/index.php: -------------------------------------------------------------------------------- 1 | /admin/style.css': '<%= paths.style %>/admin/style.scss', 8 | '<%= paths.style %>/front/style.css': '<%= paths.style %>/front/style.scss' 9 | } 10 | }, 11 | dev: { 12 | options: { 13 | style: 'expanded', 14 | }, 15 | files: { 16 | '<%= paths.style %>/admin/style.css': '<%= paths.style %>/admin/style.scss', 17 | '<%= paths.style %>/front/style.css': '<%= paths.style %>/front/style.scss' 18 | } 19 | }, 20 | }; -------------------------------------------------------------------------------- /grunt/uglify.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | dist : { 3 | files : { 4 | '<%= concat.admin.dest %>' : '<%= concat.admin.dest %>', 5 | '<%= concat.front.dest %>' : '<%= concat.front.dest %>' 6 | } 7 | } 8 | }; -------------------------------------------------------------------------------- /grunt/watch.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | styles : { 3 | files : ['<%= paths.style %>/**/**/*.scss'], 4 | tasks : ['sass:dev'] 5 | }, 6 | scripts : { 7 | files : ['<%= concat.admin.src %>', '<%= concat.front.src %>'], 8 | tasks : ['concat:admin', 'concat:front'] 9 | } 10 | }; -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /languages/woo-pagarme-payments-pt_BR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pagarme/woocommerce/8b71dbd02e596bed92bf68d691d76db719a69690/languages/woo-pagarme-payments-pt_BR.mo -------------------------------------------------------------------------------- /logs/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ./tests/ 9 | 10 | 11 | 12 | 13 | ./src/ 14 | 15 | 16 | ./src/Block/ReactCheckout/ 17 | 18 | 19 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.organization=pagarme 2 | sonar.projectKey=woocommerce 3 | sonar.projectName=woocommerce 4 | sonar.projectVersion=1.0 5 | sonar.sources=. 6 | sonar.sourceEncoding=UTF-8 7 | sonar.exclusions=**/.circleci/**, **/.github/**, **/e2e/**, **/built.js, *.xml, *.yml 8 | -------------------------------------------------------------------------------- /src/Action/ActionsRunner.php: -------------------------------------------------------------------------------- 1 | actionClasses as $actionClass) { 18 | $class = sprintf(__NAMESPACE__ . '\%s', $actionClass); 19 | $action = new $class(); 20 | $action->run(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Action/RunnerInterface.php: -------------------------------------------------------------------------------- 1 | $this->paymentModel->getMessage(), 20 | 'logo' => $this->paymentModel->getImage() 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Block/ReactCheckout/Billet.php: -------------------------------------------------------------------------------- 1 | config = new Config; 18 | add_action('woocommerce_api_pagarme-tds-token', [$this, 'getTdsToken']); 19 | } 20 | 21 | public function getTdsToken() 22 | { 23 | $accountId = $this->config->getAccountId(); 24 | $tdsTokenService = new TdsTokenService($this->config); 25 | wp_send_json_success([ 26 | 'token' => $tdsTokenService->getTdsToken($accountId) 27 | ]); 28 | wp_die(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Controller/index.php: -------------------------------------------------------------------------------- 1 | config = new Config(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Model/Config/Source/CheckoutTypes.php: -------------------------------------------------------------------------------- 1 | getSecretKey(); 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /src/Model/Data/OptionSourceInterface.php: -------------------------------------------------------------------------------- 1 | '', 'label' => '