org.mule.modules

mule-module-paypal

2.2
Namespacehttp://www.mulesoft.org/schema/mule/paypal
Schema Locationhttp://www.mulesoft.org/schema/mule/paypal/2.0/mule-paypal.xsd
Version2.0
Minimum Mule Version3.2

Module Overview

Cloud connector for Paypal.

PayPal is a service that enables you to pay, send money, and accept payments without revealing your financial information.

PayPal acts like a digital wallet where you can securely store all your payment options, such as your bank account and credit card. When you want to make a payment, you don't have to pull out your credit card or type your billing info every time. Simply click on the PayPal checkout button, log in to your PayPal account, and select your preferred payment method. We'll complete the payment process—without sharing your info with merchants and sellers.

This connector lets mule users to perform

Summary

Configuration
<paypal:config>
Configure an instance of this module
Message Processors
<paypal:address-verify>
Confirms whether a postal address and postal code match those of the specified PayPal account holder.
<paypal:authorize>
Authorize a payment
<paypal:capture>
Capture an authorized payment.
<paypal:do-direct-payment>
Process a credit card payment.
<paypal:do-void>
Void an order or an authorization.
<paypal:get-balance>
Obtain the available balance for a PayPal account.
<paypal:get-pal-details>
Obtain your Pal ID, which is the PayPal-assigned merchant account number, and other information about your account.
<paypal:get-transaction-details>
Obtain information about a specific transaction.
<paypal:manage-pending-transaction-status>
Accept or deny a pending transaction held by Fraud Management Filters.
<paypal:mass-pay>
Make a payment to one or more PayPal account holders.
<paypal:re-authorize>
Reauthorize an amount for a previously authorized transaction.
<paypal:refund-transaction>
Issue a refund to the PayPal account holder associated with a transaction.

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:paypal="http://www.mulesoft.org/schema/mule/paypal"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/paypal
               http://www.mulesoft.org/schema/mule/paypal/2.0/mule-paypal.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necesary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescription
xs:string name Optional. Give a name to this configuration so it can be later referenced.
defaultCurrency Optional. Default currency used if none is specified in the operation
xs:string password Paypal password
xs:string signature PayPal-generated unique digital signature.
xs:string subject Optional. An indicator in an API call of the account for whom the call is being made
xs:string username Paypal username

Message Processors

<paypal:address-verify>

Confirms whether a postal address and postal code match those of the specified PayPal account holder.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
email The email of the account's holder
street The street to verify
zip The zip address to verify
Child Elements
Return Payload
  • AddressVerifyResponseType with the confirmation status of for parameter.

<paypal:authorize>

Authorize a payment

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
transactionId The value of the order's transaction identification number returned by PayPal. Character length and limits: 19 single-byte characters maximum.
amount Amount to authorize. Limitations: Value is a positive number which cannot exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
amountCurrency Optional. The currency in which amount is expressed. If it is null, then the defaultCurrency is used.
transactionEntity Optional. Type of transaction to authorize. The only allowable value is Order, which means that the transaction represents a customer order that can be fulfilled over 29 days.
Child Elements
Return Payload
  • DoAuthorizationResponseType with transaction and authorization information.

<paypal:capture>

Capture an authorized payment.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
authorizationId The authorization identification number of the payment you want to capture. This is the transaction id returned from DoExpressCheckoutPayment or DoDirectPayment. Character length and limits: 19 single-byte characters maximum.
complete The value Complete indicates that this the last capture you intend to make. The value NotComplete indicates that you intend to make additional captures
amount Amount to capture. Limitations: Value is a positive number which cannot exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
amountCurrency Optional. The currency in which amount is expressed. If it is null, then the defaultCurrency is used.
invoiceId Optional. Your invoice number or other identification number that is displayed to the merchant and customer in his transaction history. NOTE: This value on DoCapture will overwrite a value previously set on DoAuthorization. NOTE: The value is recorded only if the authorization you are capturing is an order authorization, not a basic authorization. Character length and limits: 127 single-byte alphanumeric characters.
note Optional. An informational note about this settlement that is displayed to the payer in email and in his transaction history. Character length and limits: 255 single-byte characters.
softDescriptor Optional. The soft descriptor is a per transaction description of the payment that is passed to the consumer's credit card statement.
Child Elements
Return Payload
  • A DoCaptureResponseType. Only the authorization ID, transaction ID, transaction type, payment date, gross amount and payment status are guaranteed to be returned. If you need the values of other fields and they are not returned, you can obtain their values later by calling GetTransactionDetails or by using the reporting mechanism.

<paypal:do-direct-payment>

Process a credit card payment.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
ipAddress IP address of the payer's browser. NOTE: PayPal records this IP addresses as a means to detect possible fraud. Character length and limitations: 15 single-byte characters, including periods, for example: 255.255.255.255.
paymentAction Optional. How you want to obtain payment: () "Authorization" indicates that this payment is a basic authorization subject to settlement with PayPal Authorization & Capture. () "Sale" indicates that this is a final sale for which you are requesting payment.
setReturnFMFDetails Optional. Flag to indicate whether you want the results returned by Fraud Management Filters. By default, you do not receive this information.
Child Elements
<paypal:cardDetails>
Credit card details
<paypal:paymentDetails>
Payment details
Return Payload
  • DoDirectPaymentResponseType with information about the payment.

<paypal:do-void>

Void an order or an authorization.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
authorizationId The original authorization ID specifying the authorization to void or, to void an order, the order ID. IMPORTANT: If you are voiding a transaction that has been reauthorized, use the ID from the original authorization, and not the reauthorization. Character length and limits: 19 single-byte characters.
note Optional. An informational note about this void that is displayed to the payer in email and in his transaction history. Character length and limits: 255 single-byte characters
Child Elements
Return Payload

<paypal:get-balance>

Obtain the available balance for a PayPal account.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
returnAllCurrencies Optional. If true, returns the balance for each currency holding, otherwise only the balance for the primary currency holding
Child Elements
Return Payload
  • the balance for the account GetBalanceResponseType

<paypal:get-pal-details>

Obtain your Pal ID, which is the PayPal-assigned merchant account number, and other information about your account. You need the account number when working with dynamic versions of PayPal buttons and logos.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
Child Elements
Return Payload
  • GetPalDetailsResponseType with the account details.

<paypal:get-transaction-details>

Obtain information about a specific transaction.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
transactionId Unique identifier of a transaction. NOTE: The details for some kinds of transactions cannot be retrieved with GetTransactionDetails. You cannot obtain details of bank transfer withdrawals, for example. Character length and limitations: 17 single-byte alphanumeric characters.
Child Elements
Return Payload
  • GetTransactionDetailsResponseType with the transaction details.

<paypal:manage-pending-transaction-status>

Accept or deny a pending transaction held by Fraud Management Filters.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
transactionId The transaction ID of the payment transaction.
action The operation you want to perform on the transaction, which is one of the following actions: () Accept - accepts the payment () Deny - rejects the payment
Child Elements
Return Payload
  • ManagePendingTransactionStatusResponseType with the ID and current status of the transactin.

<paypal:mass-pay>

Make a payment to one or more PayPal account holders.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
emailSubject The subject line of the email that PayPal sends when the transaction is completed. The subject line is the same for all recipients. Character length and limitations: 255 single-byte alphanumeric characters.
receiverType Indicates how you identify the recipients of payments in this call to MassPay. Must be EmailAddress or UserID.
Child Elements
<paypal:massPayItems>
Details of each payment. NOTE: A single request can include up to 250 MassPayItems.
Return Payload
  • MassPayResponseType with no specific information about the payments.

<paypal:re-authorize>

Reauthorize an amount for a previously authorized transaction.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
authorizationId The value of a previously authorized transaction identification number returned by PayPal. Character length and limits: 19 single-byte characters maximum.
amount Amount to reauthorize. Limitations: Value is a positive number which cannot exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
amountCurrency Optional. The currency in which amount is expressed. If it is null, then the defaultCurrency is used.
Child Elements
Return Payload
  • DoReauthorizationResponseType containing payment status and the new authorization identification number.

<paypal:refund-transaction>

Issue a refund to the PayPal account holder associated with a transaction.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
transactionId Unique identifier of a transaction. Character length and limitations: 17 single-byte alphanumeric characters.
invoiceId Optional. Your own invoice or tracking number. Character length and limitations: 127 single-byte alphanumeric characters
refundType Type of refund you are making: () Full - default () Partial
amount Refund amount. Amount is required if RefundType is Partial. NOTE: If RefundType is not specified, do not set the Amount.
amountCurrency Optional. The currency in which amount is expressed. If it is null, then the defaultCurrency is used.
memo Optional. Custom memo about the refund. Character length and limitations: 255 single-byte alphanumeric characters.
Child Elements
Return Payload
  • RefundTransactionResponseType with information about the refunded amount (transaction fee redunded, gross, net and total refunded amount)