Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Changed protocol to https in Blueprint schema URL - see CAMEL-9614

...

The Braintree component provides access to Braintree Payments trough through theirs Java SDK. services which support the following payment methods:

In order to All client applications need API credential in order to process payments. In order to use camel-braintree with your account, you 'll need to create a new provide some API credentials you can obtains from your account (Sandbox or Production account. )

Maven users will need to add the following dependency to their pom.xml for this component:

 

Code Block
languagexml
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-braintree</artifactId>
     <version>${camel-version}</version><version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>

 

URI format

 

Code Block
linkedinbraintree://endpoint-prefix/endpoint?[options]

 

...

Option
Type
Description
environmentStringvalue that specifies where requests should be directed – sandbox or production
merchantIdStringa unique identifier for your gateway account, which is different than your merchant account ID
publicKeyStringuser-specific public identifier
privateKeyStringuser-specific secure identifier that should not be shared – even with us!
httpLogLeveljava.util.logging.Levelcamel 2.17.1 Logging level for http calls
httpLogNameStringcamel 2.17.1 Log category to use to log http calls, default "Braintree"
httpReadTimeoutIntegercamel 2.17.1 Read timeout for http calls

All the options above are provided by Braintree Payments

...

Examples


Code Block
languagexml
titleBlueprint
<?xml version="1.0"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
           xsi:schemaLocation="
             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
             http://www.osgi.org/xmlns/blueprint/v1.0.0 httphttps://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
             http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">


    <cm:property-placeholder id="placeholder" persistent-id="camel.braintree">
    </cm:property-placeholder>

    <bean id="braintree" class="org.apache.camel.component.braintree.BraintreeComponent">
        <property name="configuration">
            <bean class="org.apache.camel.component.braintree.BraintreeConfiguration">
                <property name="environment" value="${environment}"/>
                <property name="merchantId" value="${merchantId}"/>
                <property name="publicKey" value="${publicKey}"/>
                <property name="privateKey" value="${privateKey}"/>
            </bean>
        </property>
    </bean>

    <camelContext trace="true" xmlns="http://camel.apache.org/schema/blueprint" id="braintree-example-context">
        <route id="braintree-example-route">
            <from uri="direct:generateClientToken"/>
            <to uri="braintree://clientToken/generate"/>
            <to uri="stream:out"/>
        </route>
    </camelContext>

</blueprint>



...