├── Api ├── AuthInterface.php ├── CreditPriceRepositoryInterface.php └── Data │ ├── AuthDataInterface.php │ ├── CreditPriceDataInterface.php │ └── TransactionDetailDataInterface.php ├── Block ├── Adminhtml │ ├── Form │ │ └── Field │ │ │ ├── CcTypes.php │ │ │ ├── Countries.php │ │ │ ├── CountryCreditCard.php │ │ │ ├── StylingButtons.php │ │ │ └── Validation.php │ ├── System │ │ └── Config │ │ │ └── Preview.php │ └── Virtual │ │ ├── Edit │ │ └── Form.php │ │ ├── Form.php │ │ └── Script.php ├── ApplePay │ ├── AbstractButton.php │ ├── Info.php │ └── Shortcut │ │ └── Button.php ├── Credit │ ├── Bml │ │ └── Banners.php │ └── Calculator │ │ ├── Cart.php │ │ ├── Listing │ │ └── Product.php │ │ └── Product │ │ └── View.php ├── Customer │ ├── CardRenderer.php │ └── PayPal │ │ └── VaultTokenRenderer.php ├── Form.php ├── GooglePay │ ├── AbstractButton.php │ ├── Checkout │ │ └── Review.php │ ├── Info.php │ └── Shortcut │ │ └── Button.php ├── Info.php ├── LayoutProcessor │ └── Checkout │ │ └── Onepage.php ├── Payment.php ├── Paypal │ ├── Button.php │ ├── Checkout │ │ └── Review.php │ └── ProductPage.php └── System │ └── Config │ └── Form │ ├── Field │ └── RequiresStatus.php │ └── Fieldset.php ├── CHANGELOG.md ├── Console └── VaultMigrate.php ├── Controller ├── Adminhtml │ ├── Configuration │ │ └── Validate.php │ ├── Payment │ │ └── GetNonce.php │ ├── Report │ │ └── Index.php │ └── Virtual │ │ ├── Index.php │ │ └── Save.php ├── GooglePay │ ├── AbstractAction.php │ ├── PlaceOrder.php │ ├── Review.php │ └── SaveShippingMethod.php ├── Payment │ ├── GetNonce.php │ └── UpdatePaymentMethod.php ├── Paypal │ ├── AbstractAction.php │ ├── Cart.php │ ├── OneClick.php │ ├── PlaceOrder.php │ ├── Review.php │ └── SaveShippingMethod.php └── Webhook │ └── FraudProtection.php ├── Cron ├── CreditPrice.php └── Update.php ├── Gateway ├── Command │ ├── CaptureStrategyCommand.php │ ├── GatewayCommand.php │ └── GetPaymentNonceCommand.php ├── Config │ ├── CanVoidHandler.php │ ├── Config.php │ ├── PayPal │ │ └── Config.php │ ├── PayPalCredit │ │ └── Config.php │ ├── PayPalPayLater │ │ └── Config.php │ └── Vault │ │ └── Config.php ├── Data │ ├── AddressAdapterInterface.php │ └── Order │ │ ├── AddressAdapter.php │ │ └── OrderAdapter.php ├── Helper │ └── SubjectReader.php ├── Http │ ├── Client │ │ ├── AbstractTransaction.php │ │ ├── TransactionRefund.php │ │ ├── TransactionSale.php │ │ ├── TransactionSubmitForPartialSettlement.php │ │ ├── TransactionSubmitForSettlement.php │ │ └── TransactionVoid.php │ └── TransferFactory.php ├── Request │ ├── AchDataBuilder.php │ ├── AddressDataBuilder.php │ ├── CaptureDataBuilder.php │ ├── ChannelDataBuilder.php │ ├── CustomFieldsDataBuilder.php │ ├── CustomerDataBuilder.php │ ├── CvvDataBuilder.php │ ├── DescriptorDataBuilder.php │ ├── DeviceDataBuilder.php │ ├── FraudDataBuilder.php │ ├── Level23ProcessingDataBuilder.php │ ├── PayPal │ │ ├── DeviceDataBuilder.php │ │ └── VaultDataBuilder.php │ ├── PaymentDataBuilder.php │ ├── RefundDataBuilder.php │ ├── SettlementDataBuilder.php │ ├── ThreeDSecureDataBuilder.php │ ├── ThreeDSecureVaultDataBuilder.php │ ├── TransactionSourceDataBuilder.php │ ├── VaultCaptureDataBuilder.php │ ├── VaultDataBuilder.php │ └── VoidDataBuilder.php ├── Response │ ├── CardDetailsHandler.php │ ├── PayPal │ │ └── VaultDetailsHandler.php │ ├── PayPalDetailsHandler.php │ ├── PaymentDetailsHandler.php │ ├── RefundHandler.php │ ├── RiskDataHandler.php │ ├── ThreeDSecureDetailsHandler.php │ ├── TransactionIdHandler.php │ ├── VaultDetailsHandler.php │ ├── Venmo │ │ └── VaultDetailsHandler.php │ └── VoidHandler.php └── Validator │ ├── GeneralResponseValidator.php │ ├── PaymentNonceResponseValidator.php │ └── ResponseValidator.php ├── Helper ├── CcType.php └── Country.php ├── LICENSE.txt ├── LICENSE_AFL.txt ├── Model ├── Ach │ ├── PaymentDetailsHandler.php │ └── Ui │ │ └── ConfigProvider.php ├── Adapter │ ├── BraintreeAdapter.php │ └── BraintreeSearchAdapter.php ├── Adminhtml │ ├── Source │ │ ├── CcType.php │ │ ├── DisabledFundingOptions.php │ │ ├── Environment.php │ │ ├── GooglePayBtnColor.php │ │ ├── GooglePayCcType.php │ │ ├── Location.php │ │ ├── LpmMethods.php │ │ ├── PayPalButtonType.php │ │ └── PaymentAction.php │ └── System │ │ └── Config │ │ ├── BmlPosition.php │ │ ├── Country.php │ │ └── CountryCreditCard.php ├── ApplePay │ ├── Auth.php │ ├── Auth │ │ └── Data.php │ ├── Config.php │ ├── PaymentDetailsHandler.php │ └── Ui │ │ └── ConfigProvider.php ├── AvsEmsCodeMapper.php ├── CheckoutConfigProvider.php ├── Config │ └── Source │ │ ├── Color.php │ │ ├── FraudProtectionUrl.php │ │ ├── Label.php │ │ ├── PayPalMessages │ │ ├── Layout.php │ │ ├── Logo.php │ │ ├── LogoPosition.php │ │ └── TextColor.php │ │ ├── Shape.php │ │ └── Size.php ├── CreditPrice.php ├── CustomFields │ ├── CustomFieldInterface.php │ └── Pool.php ├── CvvEmsCodeMapper.php ├── GooglePay │ ├── Auth.php │ ├── Auth │ │ └── Data.php │ ├── Config.php │ ├── Helper │ │ └── QuoteUpdater.php │ ├── PaymentDetailsHandler.php │ └── Ui │ │ └── ConfigProvider.php ├── InstantPurchase │ ├── CreditCard │ │ ├── AvailabilityChecker.php │ │ └── TokenFormatter.php │ ├── PayPal │ │ └── TokenFormatter.php │ └── PaymentAdditionalInformationProvider.php ├── LocaleResolver.php ├── Lpm │ ├── Config.php │ ├── PaymentDetailsHandler.php │ └── Ui │ │ └── ConfigProvider.php ├── Multishipping │ └── PlaceOrder.php ├── Paypal │ ├── CreditApi.php │ ├── Helper │ │ ├── AbstractHelper.php │ │ ├── OrderPlace.php │ │ ├── QuoteUpdater.php │ │ └── ShippingMethodUpdater.php │ └── OrderCancellationService.php ├── Recaptcha │ └── ReCaptchaValidation.php ├── Report │ ├── ConditionAppliers │ │ ├── ApplierInterface.php │ │ ├── AppliersPool.php │ │ ├── MultipleValue.php │ │ ├── Range.php │ │ └── Text.php │ ├── FilterMapper.php │ ├── Row │ │ └── TransactionMap.php │ └── TransactionsCollection.php ├── ResourceModel │ ├── CreditPrice.php │ ├── CreditPrice │ │ └── Collection.php │ ├── CreditPriceRepository.php │ └── TransactionDetail.php ├── StoreConfigResolver.php ├── TransactionDetail.php ├── Ui │ ├── Adminhtml │ │ ├── PayPal │ │ │ └── TokenUiComponentProvider.php │ │ └── TokenUiComponentProvider.php │ ├── ConfigProvider.php │ ├── PayPal │ │ ├── ConfigProvider.php │ │ └── TokenUiComponentProvider.php │ ├── TokenUiComponentProvider.php │ └── Vault │ │ └── ConfigProvider.php ├── Venmo │ ├── PaymentDetailsHandler.php │ └── Ui │ │ └── ConfigProvider.php └── Webhook │ └── Config.php ├── Observer ├── AddApplePayShortcuts.php ├── AddGooglePayShortcuts.php ├── AddPaypalShortcuts.php ├── DataAssignObserver.php └── SalesOrderSaveObserver.php ├── Plugin ├── AddAgreementsToMinicartConfig.php ├── AddFlagForVirtualProducts.php ├── DeleteStoredPaymentPlugin.php ├── ExcludeFromMinification.php ├── OrderCancellation.php ├── ProductDetailsBlockPlugin.php └── SalesOrderGridPlugin.php ├── README.md ├── Setup ├── UpgradeData.php └── UpgradeSchema.php ├── Test └── Unit │ ├── Block │ └── FormTest.php │ ├── Console │ └── VaultMigrateTest.php │ ├── Controller │ ├── Payment │ │ └── GetNonceTest.php │ └── Paypal │ │ ├── PlaceOrderTest.php │ │ ├── ReviewTest.php │ │ └── SaveShippingMethodTest.php │ ├── Gateway │ ├── Command │ │ └── CaptureStrategyCommandTest.php │ ├── Config │ │ ├── CanVoidHandlerTest.php │ │ └── ConfigTest.php │ ├── Helper │ │ └── SubjectReaderTest.php │ ├── Http │ │ ├── Client │ │ │ ├── TransactionSaleTest.php │ │ │ └── TransactionSubmitForSettlementTest.php │ │ └── TransferFactoryTest.php │ ├── Request │ │ ├── AddressDataBuilderTest.php │ │ ├── CaptureDataBuilderTest.php │ │ ├── ChannelDataBuilderTest.php │ │ ├── CustomerDataBuilderTest.php │ │ ├── DescriptorDataBuilderTest.php │ │ ├── PayPal │ │ │ ├── DeviceDataBuilderTest.php │ │ │ └── VaultDataBuilderTest.php │ │ ├── PaymentDataBuilderTest.php │ │ ├── RefundDataBuilderTest.php │ │ ├── SettlementDataBuilderTest.php │ │ ├── ThreeDSecureDataBuilderTest.php │ │ ├── VaultCaptureDataBuilderTest.php │ │ └── VaultDataBuilderTest.php │ └── Response │ │ ├── CardDetailsHandlerTest.php │ │ ├── PayPalDetailsHandlerTest.php │ │ ├── PaymentDetailsHandlerTest.php │ │ ├── RiskDataHandlerTest.php │ │ ├── ThreeDSecureDetailsHandlerTest.php │ │ ├── TransactionIdHandlerTest.php │ │ └── VoidHandlerTest.php │ ├── Helper │ ├── CcTypeTest.php │ └── CountryTest.php │ ├── Model │ ├── Adminhtml │ │ └── System │ │ │ └── Config │ │ │ ├── CountryCreditCardTest.php │ │ │ └── CountryTest.php │ ├── AvsEmsCodeMapperTest.php │ ├── CvvEmsCodeMapperTest.php │ ├── Paypal │ │ └── Helper │ │ │ ├── OrderPlaceTest.php │ │ │ ├── QuoteUpdaterTest.php │ │ │ └── ShippingMethodUpdaterTest.php │ ├── Report │ │ ├── BraintreeSearchNodeStub.php │ │ ├── BraintreeTransactionStub.php │ │ ├── FilterMapperTest.php │ │ ├── TransactionMapTest.php │ │ └── TransactionsCollectionTest.php │ └── Ui │ │ ├── Adminhtml │ │ ├── PayPal │ │ │ └── TokenUiComponentProviderTest.php │ │ └── TokenUiComponentProviderTest.php │ │ ├── ConfigProviderTest.php │ │ └── PayPal │ │ ├── ConfigProviderTest.php │ │ └── TokenUiComponentProviderTest.php │ ├── Observer │ ├── AddPaypalShortcutsTest.php │ └── DataAssignObserverTest.php │ └── Ui │ └── Component │ └── Report │ ├── Filters │ └── Type │ │ └── DateRangeTest.php │ └── Listing │ └── Column │ └── CheckColumnOptionSourceTest.php ├── Ui └── Component │ └── Report │ ├── DataProvider │ └── FilterPool.php │ ├── Filters │ └── Type │ │ └── DateRange.php │ └── Listing │ └── Column │ ├── PaymentType.php │ ├── Status.php │ └── TransactionType.php ├── braintree_php └── lib │ ├── Braintree.php │ ├── Braintree │ ├── AccountUpdaterDailyReport.php │ ├── AchMandate.php │ ├── AddOn.php │ ├── AddOnGateway.php │ ├── Address.php │ ├── AddressGateway.php │ ├── ApplePayCard.php │ ├── ApplePayGateway.php │ ├── ApplePayOptions.php │ ├── AuthorizationAdjustment.php │ ├── Base.php │ ├── BinData.php │ ├── ClientToken.php │ ├── ClientTokenGateway.php │ ├── Collection.php │ ├── Configuration.php │ ├── ConnectedMerchantPayPalStatusChanged.php │ ├── ConnectedMerchantStatusTransitioned.php │ ├── CredentialsParser.php │ ├── CreditCard.php │ ├── CreditCardGateway.php │ ├── CreditCardVerification.php │ ├── CreditCardVerificationGateway.php │ ├── CreditCardVerificationSearch.php │ ├── Customer.php │ ├── CustomerGateway.php │ ├── CustomerSearch.php │ ├── Descriptor.php │ ├── Digest.php │ ├── Disbursement.php │ ├── DisbursementDetails.php │ ├── Discount.php │ ├── DiscountGateway.php │ ├── Dispute.php │ ├── Dispute │ │ ├── EvidenceDetails.php │ │ ├── PayPalMessageDetails.php │ │ ├── StatusHistoryDetails.php │ │ └── TransactionDetails.php │ ├── DisputeGateway.php │ ├── DisputeSearch.php │ ├── DocumentUpload.php │ ├── DocumentUploadGateway.php │ ├── EndsWithNode.php │ ├── EqualityNode.php │ ├── Error │ │ ├── Codes.php │ │ ├── ErrorCollection.php │ │ ├── Validation.php │ │ └── ValidationErrorCollection.php │ ├── Exception.php │ ├── Exception │ │ ├── Authentication.php │ │ ├── Authorization.php │ │ ├── Configuration.php │ │ ├── Connection.php │ │ ├── GatewayTimeout.php │ │ ├── InvalidChallenge.php │ │ ├── InvalidSignature.php │ │ ├── NotFound.php │ │ ├── RequestTimeout.php │ │ ├── SSLCaFileNotFound.php │ │ ├── SSLCertificate.php │ │ ├── ServerError.php │ │ ├── ServiceUnavailable.php │ │ ├── TestOperationPerformedInProduction.php │ │ ├── Timeout.php │ │ ├── TooManyRequests.php │ │ ├── Unexpected.php │ │ ├── UpgradeRequired.php │ │ └── ValidationsFailed.php │ ├── FacilitatedDetails.php │ ├── FacilitatorDetails.php │ ├── Gateway.php │ ├── GooglePayCard.php │ ├── GrantedPaymentInstrumentUpdate.php │ ├── GraphQL.php │ ├── GraphQLClient.php │ ├── Http.php │ ├── HttpHelpers │ │ ├── Curl.php │ │ ├── CurlRequest.php │ │ └── HttpRequest.php │ ├── Instance.php │ ├── IsNode.php │ ├── KeyValueNode.php │ ├── LocalPaymentCompleted.php │ ├── LocalPaymentExpired.php │ ├── LocalPaymentFunded.php │ ├── LocalPaymentReversed.php │ ├── Merchant.php │ ├── MerchantAccount.php │ ├── MerchantAccount │ │ ├── AddressDetails.php │ │ ├── BusinessDetails.php │ │ ├── FundingDetails.php │ │ └── IndividualDetails.php │ ├── MerchantAccountGateway.php │ ├── MerchantGateway.php │ ├── Modification.php │ ├── MultipleValueNode.php │ ├── MultipleValueOrTextNode.php │ ├── OAuthAccessRevocation.php │ ├── OAuthCredentials.php │ ├── OAuthGateway.php │ ├── OAuthResult.php │ ├── PaginatedCollection.php │ ├── PaginatedResult.php │ ├── PartialMatchNode.php │ ├── PartnerMerchant.php │ ├── PayPalAccount.php │ ├── PayPalAccountGateway.php │ ├── PaymentInstrumentType.php │ ├── PaymentMethod.php │ ├── PaymentMethodGateway.php │ ├── PaymentMethodNonce.php │ ├── PaymentMethodNonceGateway.php │ ├── PaymentMethodParser.php │ ├── Plan.php │ ├── PlanGateway.php │ ├── ProcessorResponseTypes.php │ ├── RangeNode.php │ ├── ResourceCollection.php │ ├── Result │ │ ├── CreditCardVerification.php │ │ ├── Error.php │ │ ├── Successful.php │ │ └── UsBankAccountVerification.php │ ├── RevokedPaymentMethodMetadata.php │ ├── RiskData.php │ ├── SamsungPayCard.php │ ├── SettlementBatchSummary.php │ ├── SettlementBatchSummaryGateway.php │ ├── ShippingMethod.php │ ├── SignatureService.php │ ├── Subscription.php │ ├── Subscription │ │ └── StatusDetails.php │ ├── SubscriptionGateway.php │ ├── SubscriptionSearch.php │ ├── Test │ │ ├── AuthenticationIds.php │ │ ├── CreditCardNumbers.php │ │ ├── MerchantAccount.php │ │ ├── Nonces.php │ │ ├── Transaction.php │ │ ├── TransactionAmounts.php │ │ └── VenmoSdk.php │ ├── TestingGateway.php │ ├── TextNode.php │ ├── ThreeDSecureInfo.php │ ├── Transaction.php │ ├── Transaction │ │ ├── AddressDetails.php │ │ ├── ApplePayCardDetails.php │ │ ├── CreditCardDetails.php │ │ ├── CustomerDetails.php │ │ ├── GooglePayCardDetails.php │ │ ├── LocalPaymentDetails.php │ │ ├── PayPalDetails.php │ │ ├── PayPalHereDetails.php │ │ ├── SamsungPayCardDetails.php │ │ ├── StatusDetails.php │ │ ├── SubscriptionDetails.php │ │ ├── UsBankAccountDetails.php │ │ ├── VenmoAccountDetails.php │ │ └── VisaCheckoutCardDetails.php │ ├── TransactionGateway.php │ ├── TransactionLineItem.php │ ├── TransactionLineItemGateway.php │ ├── TransactionReview.php │ ├── TransactionSearch.php │ ├── UnknownPaymentMethod.php │ ├── UsBankAccount.php │ ├── UsBankAccountGateway.php │ ├── UsBankAccountVerification.php │ ├── UsBankAccountVerificationGateway.php │ ├── UsBankAccountVerificationSearch.php │ ├── Util.php │ ├── VenmoAccount.php │ ├── Version.php │ ├── VisaCheckoutCard.php │ ├── WebhookNotification.php │ ├── WebhookNotificationGateway.php │ ├── WebhookTesting.php │ ├── WebhookTestingGateway.php │ ├── Xml.php │ └── Xml │ │ ├── Generator.php │ │ └── Parser.php │ ├── autoload.php │ └── ssl │ └── api_braintreegateway_com.ca.crt ├── composer.json ├── etc ├── acl.xml ├── adminhtml │ ├── di.xml │ ├── menu.xml │ ├── routes.xml │ └── system.xml ├── config.xml ├── crontab.xml ├── csp_whitelist.xml ├── di.xml ├── events.xml ├── frontend │ ├── di.xml │ ├── events.xml │ ├── routes.xml │ └── sections.xml ├── module.xml ├── payment.xml └── webapi.xml ├── i18n └── en_US.csv ├── registration.php └── view ├── adminhtml ├── layout │ ├── adminhtml_system_config_edit.xml │ ├── braintree_report_index.xml │ ├── braintree_virtual_index.xml │ ├── sales_order_create_index.xml │ └── sales_order_create_load_block_billing_method.xml ├── templates │ ├── form │ │ ├── cc.phtml │ │ ├── paypal │ │ │ └── vault.phtml │ │ └── vault.phtml │ ├── grid │ │ └── tooltip.phtml │ ├── payment │ │ └── script.phtml │ ├── system │ │ └── config │ │ │ └── preview.phtml │ └── virtual │ │ ├── form.phtml │ │ └── script.phtml ├── ui_component │ ├── braintree_report.xml │ └── sales_order_grid.xml └── web │ ├── css │ └── source │ │ └── _module.less │ ├── images │ ├── braintree_allinone.png │ ├── braintree_incapplepay.png │ ├── braintree_incgpay.jpg │ └── braintree_logo.png │ ├── js │ ├── braintree.js │ ├── grid │ │ ├── filters │ │ │ └── status.html │ │ └── provider.js │ ├── paypalButtonPreview.js │ ├── paypalStylingPreview.js │ ├── system.js │ ├── vault.js │ └── virtual.js │ └── styles.css ├── base ├── requirejs-config.js └── web │ ├── images │ ├── applepaymark.png │ ├── paypal-small.png │ └── paypal.png │ └── js │ └── validator.js └── frontend ├── layout ├── braintree_googlepay_review.xml ├── braintree_paypal_oneclick.xml ├── braintree_paypal_review.xml ├── catalog_category_view.xml ├── catalog_product_view.xml ├── checkout_cart_index.xml ├── checkout_index_index.xml ├── cms_index_index.xml ├── multishipping_checkout_billing.xml └── vault_cards_listaction.xml ├── requirejs-config.js ├── templates ├── applepay │ └── shortcut.phtml ├── bml.phtml ├── credit │ ├── cart.phtml │ └── product │ │ ├── listing.phtml │ │ └── view.phtml ├── googlepay │ ├── review.phtml │ └── shortcut.phtml ├── multishipping │ ├── form.phtml │ └── form_paypal.phtml └── paypal │ ├── button.phtml │ ├── product_page.phtml │ └── vault_token.phtml └── web ├── css └── source │ └── _extend.less ├── images ├── GooglePay_AcceptanceMark_Standard_RGB_60x24pt.svg ├── GooglePay_AcceptanceMark_Standard_RGB_60x24pt@4x.png ├── GooglePay_AcceptanceMark_WhiteShape_RGB_60x36p.svg ├── GooglePay_AcceptanceMark_WhiteShape_RGB_60x36pt@4x.png ├── GooglePay_AcceptanceMark_WhiteShape_WithStroke_RGB_62x38pt.svg ├── GooglePay_AcceptanceMark_WhiteShape_WithStroke_RGB_62x38pt@4x.png ├── bancontact.svg ├── cc │ ├── AE.png │ ├── CUP.png │ ├── DI.png │ ├── DN.png │ ├── JCB.png │ ├── MC.png │ ├── MI.png │ ├── NONE.png │ ├── PP.png │ └── VI.png ├── eps.svg ├── giropay.svg ├── ideal.svg ├── mybank.svg ├── p24.svg ├── sepa.svg ├── sofort.svg ├── venmo_logo_blue.png └── venmo_logo_white.png ├── js ├── applepay │ ├── api.js │ ├── button.js │ └── implementations │ │ ├── core-checkout │ │ ├── method-applepay.js │ │ └── method-renderer │ │ │ └── applepay.js │ │ └── shortcut.js ├── form-builder.js ├── googlepay │ ├── api.js │ ├── button.js │ └── implementations │ │ ├── core-checkout │ │ ├── method-googlepay.js │ │ └── method-renderer │ │ │ └── googlepay.js │ │ └── shortcut.js ├── model │ └── step-navigator-mixin.js ├── paypal │ ├── button.js │ ├── credit │ │ └── calculator.js │ ├── form-builder.js │ └── product-page.js ├── reCaptcha │ ├── braintree-cc-method-mixin.js │ └── reCaptcha.js └── view │ ├── payment │ ├── 3d-secure.js │ ├── ach.js │ ├── adapter.js │ ├── braintree.js │ ├── lpm.js │ ├── method-renderer │ │ ├── ach.js │ │ ├── cc-form.js │ │ ├── hosted-fields.js │ │ ├── lpm.js │ │ ├── multishipping │ │ │ ├── hosted-fields.js │ │ │ └── paypal.js │ │ ├── paypal-vault.js │ │ ├── paypal.js │ │ ├── vault.js │ │ └── venmo.js │ ├── validator-handler.js │ └── venmo.js │ └── product-page.js └── template ├── applepay └── core-checkout.html ├── checkout └── checkout-agreements.html ├── credit └── calculator.html ├── googlepay └── core-checkout.html └── payment ├── ach.html ├── cc └── vault.html ├── form.html ├── lpm.html ├── multishipping ├── form.html └── paypal.html ├── paypal.html ├── paypal └── vault.html └── venmo.html /Api/AuthInterface.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | interface AuthInterface 13 | { 14 | /** 15 | * Returns details required to be able to submit a payment with apple pay. 16 | * @return \Magento\Braintree\Api\Data\AuthDataInterface 17 | */ 18 | public function get(): AuthDataInterface; 19 | } 20 | -------------------------------------------------------------------------------- /Api/CreditPriceRepositoryInterface.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | interface CreditPriceRepositoryInterface 15 | { 16 | /** 17 | * @param \Magento\Braintree\Api\Data\CreditPriceDataInterface $entity 18 | * @return \Magento\Braintree\Api\Data\CreditPriceDataInterface 19 | */ 20 | public function save(CreditPriceDataInterface $entity): CreditPriceDataInterface; 21 | 22 | /** 23 | * @param int $productId 24 | * @return \Magento\Braintree\Api\Data\CreditPriceDataInterface 25 | */ 26 | public function getByProductId($productId); 27 | 28 | /** 29 | * @param $productId 30 | * @return \Magento\Braintree\Api\Data\CreditPriceDataInterface|\Magento\Framework\DataObject 31 | */ 32 | public function getCheapestByProductId($productId); 33 | 34 | /** 35 | * @param int $productId 36 | * @return \Magento\Braintree\Api\Data\CreditPriceDataInterface[] 37 | */ 38 | public function deleteByProductId($productId); 39 | } 40 | -------------------------------------------------------------------------------- /Api/Data/TransactionDetailDataInterface.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | interface TransactionDetailDataInterface 11 | { 12 | const ENTITY_ID = 'entity_id'; 13 | const ORDER_ID = 'order_id'; 14 | const TRANSACTION_SOURCE = 'transaction_source'; 15 | 16 | /** 17 | * @return int|null 18 | */ 19 | public function getId(); 20 | 21 | /** 22 | * @return int 23 | */ 24 | public function getOrderId(): int; 25 | 26 | /** 27 | * @return string 28 | */ 29 | public function getTransactionSource(): string; 30 | 31 | /** 32 | * @param $id 33 | * @return self 34 | */ 35 | public function setId($id); 36 | 37 | /** 38 | * @param int $orderId 39 | * @return self 40 | */ 41 | public function setOrderId($orderId); 42 | 43 | /** 44 | * @param string $transactionSource 45 | * @return self 46 | */ 47 | public function setTransactionSource($transactionSource); 48 | } 49 | -------------------------------------------------------------------------------- /Block/Adminhtml/Form/Field/Countries.php: -------------------------------------------------------------------------------- 1 | countryHelper = $countryHelper; 34 | } 35 | 36 | /** 37 | * @inheritDoc 38 | */ 39 | protected function _toHtml(): string 40 | { 41 | if (!$this->getOptions()) { 42 | $this->setOptions($this->countryHelper->getCountries()); 43 | } 44 | return parent::_toHtml(); 45 | } 46 | 47 | /** 48 | * Sets name for input element 49 | * @param string $value 50 | * @return $this 51 | */ 52 | public function setInputName($value) 53 | { 54 | return $this->setName($value); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Block/Adminhtml/Virtual/Form.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class Form extends Container 13 | { 14 | /** 15 | * @inheritDoc 16 | */ 17 | protected function _construct() 18 | { 19 | $this->_blockGroup = 'Magento_Braintree'; 20 | $this->_controller = 'adminhtml_virtual'; 21 | parent::_construct(); 22 | 23 | $this->removeButton('back'); 24 | $this->removeButton('reset'); 25 | $this->removeButton('save'); 26 | $this->addButton( 27 | 'save', 28 | [ 29 | 'label' => __('Take Payment'), 30 | 'class' => 'save primary', 31 | 'data_attribute' => [ 32 | 'mage-init' => ['button' => ['event' => 'takePayment', 'target' => '#payment_form_braintree']], 33 | ] 34 | ], 35 | 1 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Block/Adminhtml/Virtual/Script.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class Script extends Payment 13 | { 14 | /** 15 | * @return string 16 | */ 17 | public function getMethodCode(): string 18 | { 19 | return 'braintree'; 20 | } 21 | 22 | /** 23 | * @return bool 24 | */ 25 | public function isVaultEnabled(): bool 26 | { 27 | return false; 28 | } 29 | 30 | /** 31 | * @return bool 32 | */ 33 | public function hasVerification(): bool 34 | { 35 | return true; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Block/ApplePay/Info.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class Info extends \Magento\Braintree\Block\Info 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /Block/Credit/Calculator/Cart.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | class Cart extends Template 14 | { 15 | /** 16 | * @var PayPalCreditConfig $config 17 | */ 18 | protected $config; 19 | 20 | /** 21 | * Product constructor 22 | * 23 | * @param Template\Context $context 24 | * @param PayPalCreditConfig $config 25 | * @param array $data 26 | */ 27 | public function __construct( 28 | Template\Context $context, 29 | PayPalCreditConfig $config, 30 | array $data = [] 31 | ) { 32 | parent::__construct($context, $data); 33 | $this->config = $config; 34 | } 35 | 36 | /** 37 | * @inheritdoc 38 | */ 39 | protected function _toHtml(): string 40 | { 41 | if ($this->config->isCalculatorEnabled()) { 42 | return parent::_toHtml(); 43 | } 44 | 45 | return ''; 46 | } 47 | 48 | /** 49 | * @return string 50 | */ 51 | public function getMerchantName(): string 52 | { 53 | return $this->config->getMerchantName(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Block/GooglePay/Checkout/Review.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class Info extends \Magento\Braintree\Block\Info 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /Block/Info.php: -------------------------------------------------------------------------------- 1 | layoutSettings = $layoutSettings; 29 | } 30 | 31 | /** 32 | * Process js Layout of block 33 | * 34 | * @param array $jsLayout 35 | * @return array 36 | */ 37 | public function process($jsLayout) 38 | { 39 | $jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children'] 40 | ['payment']['children']['payments-list']['children']['braintree-recaptcha']['children'] 41 | ['msp_recaptcha_braintree']['settings'] = $this->layoutSettings->getCaptchaSettings(); 42 | 43 | return $jsLayout; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Block/Paypal/Checkout/Review.php: -------------------------------------------------------------------------------- 1 | resultPageFactory = $resultPageFactory; 35 | } 36 | 37 | /** 38 | * Index action 39 | * 40 | * @return Page 41 | */ 42 | public function execute(): Page 43 | { 44 | /** @var Page $resultPage */ 45 | $resultPage = $this->resultPageFactory->create(); 46 | $resultPage->setActiveMenu(static::ADMIN_RESOURCE); 47 | $resultPage->getConfig()->getTitle()->prepend(__('Braintree Settlement Report')); 48 | 49 | return $resultPage; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Controller/Adminhtml/Virtual/Index.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | class Index extends Action 16 | { 17 | const ADMIN_RESOURCE = 'Magento_Sales::create'; 18 | 19 | /** 20 | * @var PageFactory $resultPageFactory 21 | */ 22 | protected $resultPageFactory; 23 | 24 | /** 25 | * Index constructor 26 | * 27 | * @param Context $context 28 | * @param PageFactory $resultPageFactory 29 | */ 30 | public function __construct( 31 | Context $context, 32 | PageFactory $resultPageFactory 33 | ) { 34 | parent::__construct($context); 35 | $this->resultPageFactory = $resultPageFactory; 36 | } 37 | 38 | /** 39 | * @return Page 40 | */ 41 | public function execute(): Page 42 | { 43 | /** @var Page $resultPage */ 44 | $resultPage = $this->resultPageFactory->create(); 45 | $resultPage->setActiveMenu('Magento_Braintree::virtual_terminal'); 46 | $resultPage->getConfig()->getTitle()->prepend(__('Braintree Virtual Terminal')); 47 | 48 | return $resultPage; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Gateway/Data/AddressAdapterInterface.php: -------------------------------------------------------------------------------- 1 | address = $address; 29 | parent::__construct($address); 30 | } 31 | 32 | /** 33 | * @inheritdoc 34 | */ 35 | public function getStreet() 36 | { 37 | $street = $this->address->getStreet(); 38 | 39 | return empty($street) ? [] : $street; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Gateway/Http/Client/TransactionRefund.php: -------------------------------------------------------------------------------- 1 | adapter->refund( 26 | $data['transaction_id'], 27 | $data[PaymentDataBuilder::AMOUNT] 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Gateway/Http/Client/TransactionSale.php: -------------------------------------------------------------------------------- 1 | adapter->sale($data); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Gateway/Http/Client/TransactionSubmitForPartialSettlement.php: -------------------------------------------------------------------------------- 1 | adapter->submitForPartialSettlement( 19 | $data[CaptureDataBuilder::TRANSACTION_ID], 20 | $data[PaymentDataBuilder::AMOUNT] 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Gateway/Http/Client/TransactionSubmitForSettlement.php: -------------------------------------------------------------------------------- 1 | adapter->submitForSettlement( 22 | $data[CaptureDataBuilder::TRANSACTION_ID], 23 | $data[PaymentDataBuilder::AMOUNT] 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Gateway/Http/Client/TransactionVoid.php: -------------------------------------------------------------------------------- 1 | adapter->void($data['transaction_id']); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Gateway/Http/TransferFactory.php: -------------------------------------------------------------------------------- 1 | transferBuilder = $transferBuilder; 31 | } 32 | 33 | /** 34 | * Builds gateway transfer object 35 | * 36 | * @param array $request 37 | * @return TransferInterface 38 | */ 39 | public function create(array $request) 40 | { 41 | return $this->transferBuilder 42 | ->setBody($request) 43 | ->build(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Gateway/Request/ChannelDataBuilder.php: -------------------------------------------------------------------------------- 1 | self::$channelValue 33 | ]; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Gateway/Request/CustomFieldsDataBuilder.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | class CustomFieldsDataBuilder implements BuilderInterface 14 | { 15 | const CUSTOM_FIELDS = 'customFields'; 16 | 17 | /** 18 | * @var Pool $pool 19 | */ 20 | protected $pool; 21 | 22 | /** 23 | * CustomFieldsDataBuilder constructor 24 | * 25 | * @param Pool $pool 26 | */ 27 | public function __construct(Pool $pool) 28 | { 29 | $this->pool = $pool; 30 | } 31 | 32 | /** 33 | * @inheritdoc 34 | */ 35 | public function build(array $buildSubject): array 36 | { 37 | return [ 38 | self::CUSTOM_FIELDS => $this->pool->getFields($buildSubject) 39 | ]; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Gateway/Request/DescriptorDataBuilder.php: -------------------------------------------------------------------------------- 1 | config = $config; 33 | } 34 | 35 | /** 36 | * @inheritdoc 37 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) 38 | */ 39 | public function build(array $buildSubject): array 40 | { 41 | $values = $this->config->getDynamicDescriptors(); 42 | return !empty($values) ? [self::$descriptorKey => $values] : []; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Gateway/Request/DeviceDataBuilder.php: -------------------------------------------------------------------------------- 1 | subjectReader = $subjectReader; 33 | } 34 | 35 | /** 36 | * @inheritdoc 37 | */ 38 | public function build(array $buildSubject): array 39 | { 40 | $result = []; 41 | $paymentDO = $this->subjectReader->readPayment($buildSubject); 42 | $payment = $paymentDO->getPayment(); 43 | $data = $payment->getAdditionalInformation(); 44 | 45 | if (!empty($data[DataAssignObserver::DEVICE_DATA])) { 46 | $result[self::$deviceDataKey] = $data[DataAssignObserver::DEVICE_DATA]; 47 | } 48 | 49 | return $result; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Gateway/Request/SettlementDataBuilder.php: -------------------------------------------------------------------------------- 1 | [ 24 | self::SUBMIT_FOR_SETTLEMENT => true 25 | ] 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Gateway/Request/TransactionSourceDataBuilder.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | class TransactionSourceDataBuilder implements BuilderInterface 16 | { 17 | const TRANSACTION_SOURCE = 'transactionSource'; 18 | 19 | /** 20 | * @var State $state 21 | */ 22 | private $state; 23 | 24 | /** 25 | * TransactionSourceDataBuilder constructor 26 | * 27 | * @param State $state 28 | */ 29 | public function __construct(State $state) 30 | { 31 | $this->state = $state; 32 | } 33 | 34 | /** 35 | * Set TRANSACTION_SOURCE to moto if within the admin 36 | * @inheritdoc 37 | * @throws LocalizedException 38 | */ 39 | public function build(array $buildSubject): array 40 | { 41 | if ($this->state->getAreaCode() === Area::AREA_ADMINHTML) { 42 | return [ 43 | self::TRANSACTION_SOURCE => 'moto' 44 | ]; 45 | } 46 | 47 | return []; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Gateway/Request/VaultDataBuilder.php: -------------------------------------------------------------------------------- 1 | [ 34 | self::STORE_IN_VAULT_ON_SUCCESS => true 35 | ] 36 | ]; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Gateway/Request/VoidDataBuilder.php: -------------------------------------------------------------------------------- 1 | subjectReader = $subjectReader; 31 | } 32 | 33 | /** 34 | * Builds ENV request 35 | * 36 | * @param array $buildSubject 37 | * @return array 38 | */ 39 | public function build(array $buildSubject): array 40 | { 41 | $paymentDO = $this->subjectReader->readPayment($buildSubject); 42 | 43 | /** @var Payment $payment */ 44 | $payment = $paymentDO->getPayment(); 45 | 46 | return [ 47 | 'transaction_id' => $payment->getParentTransactionId() ?: $payment->getLastTransId() 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Gateway/Response/RefundHandler.php: -------------------------------------------------------------------------------- 1 | getCreditmemo()->getInvoice()->canRefund(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Gateway/Response/VoidHandler.php: -------------------------------------------------------------------------------- 1 | paymentMethodNonce) && !empty($response->paymentMethodNonce->nonce), 24 | [__('Payment method nonce can\'t be retrieved.')] 25 | ]; 26 | } 27 | ] 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Helper/CcType.php: -------------------------------------------------------------------------------- 1 | ccTypeSource = $ccTypeSource; 33 | } 34 | 35 | /** 36 | * All possible credit card types 37 | * 38 | * @return array 39 | */ 40 | public function getCcTypes(): array 41 | { 42 | if (!$this->ccTypes) { 43 | $this->ccTypes = $this->ccTypeSource->toOptionArray(); 44 | } 45 | return $this->ccTypes; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Model/Ach/PaymentDetailsHandler.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class PaymentDetailsHandler extends \Magento\Braintree\Gateway\Response\PaymentDetailsHandler 12 | { 13 | /** 14 | * List of additional details 15 | * @var array $additionalInformationMapping 16 | */ 17 | protected $additionalInformationMapping = [ 18 | self::PROCESSOR_AUTHORIZATION_CODE, 19 | self::PROCESSOR_RESPONSE_CODE, 20 | self::PROCESSOR_RESPONSE_TEXT 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /Model/Adminhtml/Source/CcType.php: -------------------------------------------------------------------------------- 1 | getAllowedTypes(); 28 | $options = []; 29 | 30 | foreach ($this->_paymentConfig->getCcTypes() as $code => $name) { 31 | if (in_array($code, $allowed)) { 32 | $options[] = ['value' => $code, 'label' => $name]; 33 | } 34 | } 35 | 36 | return $options; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Model/Adminhtml/Source/DisabledFundingOptions.php: -------------------------------------------------------------------------------- 1 | 'card', 26 | 'label' => __('PayPal Guest Checkout Credit Card Icons'), 27 | ], 28 | [ 29 | 'value' => 'elv', 30 | 'label' => __('Elektronisches Lastschriftverfahren – German ELV') 31 | ] 32 | ]; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Model/Adminhtml/Source/Environment.php: -------------------------------------------------------------------------------- 1 | self::ENVIRONMENT_SANDBOX, 28 | 'label' => 'Sandbox', 29 | ], 30 | [ 31 | 'value' => self::ENVIRONMENT_PRODUCTION, 32 | 'label' => 'Production' 33 | ] 34 | ]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Model/Adminhtml/Source/GooglePayBtnColor.php: -------------------------------------------------------------------------------- 1 | self::OPTION_WHITE, 17 | 'label' => 'White' 18 | ], 19 | [ 20 | 'value' => self::OPTION_BLACK, 21 | 'label' => 'Black', 22 | ] 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Model/Adminhtml/Source/GooglePayCcType.php: -------------------------------------------------------------------------------- 1 | 'VISA', 'label' => 'Visa'], 21 | ['value' => 'MASTERCARD', 'label' => 'MasterCard'], 22 | ['value' => 'AMEX', 'label' => 'AMEX'], 23 | ['value' => 'DISCOVER', 'label' => 'Discover'], 24 | ['value' => 'JCB', 'label' => 'JCB'] 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Model/Adminhtml/Source/Location.php: -------------------------------------------------------------------------------- 1 | 'cart', 23 | 'label' => __('Mini-Cart and Cart Page'), 24 | ], 25 | [ 26 | 'value' => 'checkout', 27 | 'label' => __('Checkout Page'), 28 | ], 29 | [ 30 | 'value' => 'productpage', 31 | 'label' => __('Product Page') 32 | ] 33 | ]; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Model/Adminhtml/Source/LpmMethods.php: -------------------------------------------------------------------------------- 1 | '', 'label' => '