Braintree

0.2.1

💰Not official Swift Braintree provider for Vapor 3
MihaelIsaev/braintree_swift

What's New

Fix `Package.swift`

2019-10-24T20:40:22Z

How to install

Edit your Package.swift

.package(url: "https://github.com/MihaelIsaev/braintree_swift", from: "0.1.0"),

And add "Braintree" in targets.

Edit your configure.swift

First of all import the lib

import Braintree

and then register it as provider

try services.register(Braintree(environment: .sandbox, merchantId: "YOUR_MERCHANT_ID", publicKey: "YOUR_PUBLIC_KEY", privateKey: "YOUR_PRIVATE_KEY"))

Little example of how to use gateways

e.g. you'd like to generate a token for a user, it is possible through ClientToken gateway

func clientToken(_ req: Request) throws -> Future<String> {
    //get an instance of Braintree provider
    let bt = try req.make(Braintree.self)
    //access clientToken gateway and call its generate endpoint
    return try bt.gateway(container: req).clientToken.generate()
}

Contribution

Please feel free to contribute!

Braintree is a big library with a lot of gateways, its objects and requests.

Below you can see a list of completed and incompleted parts of the lib, and it would be great to get any help with it.

ToDo List

Gateways

  • AddOnGateway
  • AddressGateway
  • ClientTokenGateway
  • CreditCardGateway
  • CreditCardVerificationGateway
  • CustomerGateway
  • DiscountGateway
  • DisputeGateway
  • DocumentUploadGateway
  • IdealPaymentGateway
  • MerchantAccountGateway
  • MerchantGateway
  • OAuthGateway
  • PayPalAccountGateway
  • PaymentMethodGateway
  • PaymentMethodNonceGateway
  • PlanGateway
  • ReportGateway
  • SettlementBatchSummaryGateway
  • SubscriptionGateway
  • TestingGateway
  • TransactionGateway
  • TransactionLineItemGateway
  • TransparentRedirectGateway
  • UsBankAccountGateway
  • UsBankAccountVerificationGateway
  • WebhookNotificationGateway

Objects

  • AccountUpdaterDailyReport
  • AchMandate
  • AddOn
  • Address
  • AmexExpressCheckoutCard
  • AmexExpressCheckoutDetails
  • AndroidPayCard
  • AndroidPayDetails
  • ApplePayCard
  • ApplePayDetails
  • AuthorizationAdjustment
  • BinData
  • BusinessDetails
  • CoinbaseAccount
  • CoinbaseDetails
  • ConnectedMerchantPayPalStatusChanged
  • ConnectedMerchantStatusTransitioned
  • CreditCard
  • CreditCardVerification
  • Customer
  • Descriptor
  • Disbursement
  • DisbursementDetails
  • Discount
  • Dispute
  • DisputeEvidence
  • DisputeStatusHistory
  • DisputeTransaction
  • DocumentUpload
  • EuropeBankAccount
  • FacilitatedDetails
  • FacilitatorDetails
  • FundingDetails
  • GrantedPaymentInstrumentUpdate
  • IbanBankAccount
  • IdealPayment
  • IdealPaymentDetails
  • IndividualDetails
  • MasterpassCard
  • MasterpassCardDetails
  • Merchant
  • MerchantAccount
  • Modification
  • OAuthAccessRevocation
  • OAuthCredentials
  • OAuthResult
  • PartnerMerchant
  • PayPalAccount
  • PayPalDetails
  • PaymentInstrumentType
  • PaymentMethod
  • PaymentMethodNonce
  • PaymentMethodNonceDetails
  • Plan
  • RiskData
  • SamsungPayCard
  • SamsungPayCardDetails
  • SandboxValues
  • SearchCriteria
  • SettlementBatchSummary
  • StatusEvent
  • Subscription
  • SubscriptionDetails
  • SubscriptionStatusEvent
  • ThreeDSecureInfo
  • Transaction
  • TransactionDetails
  • TransactionLevelFeeReport
  • TransactionLevelFeeReportRow
  • TransactionLineItem
  • UnknownPaymentMethod
  • UsBankAccount
  • UsBankAccountDetails
  • UsBankAccountVerification
  • ValidationError
  • ValidationErrorCode
  • ValidationErrors
  • VenmoAccount
  • VenmoAccountDetails
  • VisaCheckoutCard
  • VisaCheckoutCardDetails

Requests

  • AddModificationRequest
  • AddressRequest
  • ApplicantDetailsAddressRequest
  • ApplicantDetailsRequest
  • BusinessAddressRequest
  • BusinessRequest
  • AClientTokenOptionsRequest
  • AClientTokenRequest
  • CreditCardAddressOptionsRequest
  • CreditCardAddressRequest
  • CreditCardOptionsRequest
  • CreditCardRequest
  • CreditCardVerificationBillingAddressRequest
  • CreditCardVerificationCreditCardRequest
  • CreditCardVerificationOptionsRequest
  • CreditCardVerificationRequest
  • CreditCardVerificationSearchRequest
  • CustomerOptionsPayPalRequest
  • CustomerOptionsPayPalShippingRequest
  • CustomerOptionsRequest
  • CustomerRequest
  • CustomerSearchRequest
  • DescriptorRequest
  • DisputeSearchRequest
  • DocumentUploadRequest
  • FileEvidenceRequest
  • FundingRequest
  • IdsSearchRequest
  • IndividualAddressRequest
  • IndividualRequest
  • IndustryRequest
  • MerchantAccountCreateForCurrencyRequest
  • MerchantAccountRequest
  • ModificationRequest
  • ModificationsRequest
  • OAuthConnectUrlBusinessRequest
  • OAuthConnectUrlRequest
  • OAuthConnectUrlUserRequest
  • OAuthCredentialsRequest
  • OAuthRevokeAccessTokenRequest
  • PayPalAccountOptionsRequest
  • PayPalAccountRequest
  • PayPalOnlyAccountRequest
  • PaymentMethodAddressOptionsRequest
  • PaymentMethodAddressRequest
  • PaymentMethodDeleteRequest
  • PaymentMethodForwardRequest
  • PaymentMethodGrantRequest
  • PaymentMethodGrantRevokeRequest
  • PaymentMethodOptionsPayPalRequest
  • PaymentMethodOptionsPayPalShippingRequest
  • PaymentMethodOptionsRequest
  • PaymentMethodRequest
  • RiskDataCustomerRequest
  • RiskDataTransactionRequest
  • SEPAClientTokenRequest
  • SearchRequest
  • SettlementBatchSummaryRequest
  • SubscriptionDescriptorRequest
  • SubscriptionOptionsPayPalRequest
  • SubscriptionOptionsRequest
  • SubscriptionRequest
  • SubscriptionSearchRequest
  • SubscriptionTransactionOptionsRequest
  • SubscriptionTransactionRequest
  • TextEvidenceRequest
  • TransactionAddressRequest
  • TransactionApplePayCardRequest
  • TransactionCloneRequest
  • TransactionCreditCardRequest
  • TransactionDescriptorRequest
  • TransactionIndustryDataRequest
  • TransactionIndustryRequest
  • TransactionLevelFeeReportRequest
  • TransactionLineItemRequest
  • TransactionOptionsAmexRewardsRequest
  • TransactionOptionsCloneRequest
  • TransactionOptionsPayPalRequest
  • TransactionOptionsRequest
  • TransactionOptionsThreeDSecureRequest
  • TransactionOptionsVenmoRequest
  • TransactionPayPalRequest
  • TransactionRefundRequest
  • TransactionRequest
  • TransactionSearchRequest
  • TransactionThreeDSecurePassThruRequest
  • TransparentRedirectRequest
  • UpdateModificationRequest
  • UsBankAccountVerificationConfirmRequest
  • UsBankAccountVerificationSearchRequest

Description

  • Swift Tools 4.2.0
View More Packages from this Author

Dependencies

Last updated: Fri Oct 18 2024 14:42:54 GMT-0900 (Hawaii-Aleutian Daylight Time)