Class SalesforcePayPalOrder
Salesforce Payments representation of a PayPal order object. See Salesforce Payments documentation for how to gain access and configure it for use on your sites.
A PayPal order is automatically created when a shopper is ready to pay for items in their basket. It becomes completed when the shopper provides information to the payment provider that is acceptable to authorize payment for a given amount.
| Constant | Description |
|---|---|
| INTENT_AUTHORIZE: String = "AUTHORIZE" | Represents the "AUTHORIZE" intent, meaning manual capture. |
| INTENT_CAPTURE: String = "CAPTURE" | Represents the "CAPTURE" intent, meaning automatic capture. |
| TYPE_PAYPAL: String = "paypal" | Represents the PayPal funding source. |
| TYPE_VENMO: String = "venmo" | Represents the Venmo funding source. |
| Property | Description |
|---|---|
ID: String (read-only) | Returns the identifier of this PayPal order. |
amount: Money (read-only) | Returns the amount of this PayPal order. |
authorizationID: String (read-only) | Returns the ID of the authorization against this order, or null if not available. |
captureID: String (read-only) | Returns the ID of the capture against this order, or null if not available. |
completed: Boolean (read-only) | Returns true if this PayPal order has been completed, or false if not. |
payer: SalesforcePayPalOrderPayer (read-only) | Returns the payer information for this PayPal order, or null if not known. |
shipping: SalesforcePayPalOrderAddress (read-only) | Returns the shipping address for this PayPal order, or null if not known. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| getAmount() | Returns the amount of this PayPal order. |
| getAuthorizationID() | Returns the ID of the authorization against this order, or null if not available. |
| getCaptureID() | Returns the ID of the capture against this order, or null if not available. |
| getID() | Returns the identifier of this PayPal order. |
| getPayer() | Returns the payer information for this PayPal order, or null if not known. |
| getPaymentDetails(OrderPaymentInstrument) | Returns the details to the Salesforce Payments payment for this PayPal order, using the given payment instrument. |
| getPaymentInstrument(Basket) | Returns the payment instrument for this PayPal order in the given basket, or null if the given basket has none. |
| getPaymentInstrument(Order) | Returns the payment instrument for this PayPal order in the given order, or null if the given order has none. |
| getShipping() | Returns the shipping address for this PayPal order, or null if not known. |
| isCompleted() | Returns true if this PayPal order has been completed, or false if not. |
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
- INTENT_AUTHORIZE: String = "AUTHORIZE"
Represents the
"AUTHORIZE"intent, meaning manual capture.
- INTENT_CAPTURE: String = "CAPTURE"
Represents the
"CAPTURE"intent, meaning automatic capture.
- TYPE_PAYPAL: String = "paypal"
Represents the PayPal funding source.
- TYPE_VENMO: String = "venmo"
Represents the Venmo funding source.
- ID: String
(read-only) Returns the identifier of this PayPal order.
- amount: Money
(read-only) Returns the amount of this PayPal order.
- authorizationID: String
(read-only) Returns the ID of the authorization against this order, or
nullif not available.
- captureID: String
(read-only) Returns the ID of the capture against this order, or
nullif not available.
- completed: Boolean
(read-only) Returns
trueif this PayPal order has been completed, orfalseif not.
- payer: SalesforcePayPalOrderPayer
(read-only) Returns the payer information for this PayPal order, or
nullif not known.
- shipping: SalesforcePayPalOrderAddress
(read-only) Returns the shipping address for this PayPal order, or
nullif not known.
- getAmount(): Money
Returns the amount of this PayPal order.
Returns:
- PayPal order amount
- getAuthorizationID(): String
Returns the ID of the authorization against this order, or
nullif not available.Returns:
- PayPal order authorization identifier
- getCaptureID(): String
Returns the ID of the capture against this order, or
nullif not available.Returns:
- PayPal order capture identifier
- getID(): String
Returns the identifier of this PayPal order.
Returns:
- PayPal order identifier
- getPayer(): SalesforcePayPalOrderPayer
Returns the payer information for this PayPal order, or
nullif not known.Returns:
- order payer information
- getPaymentDetails(paymentInstrument: OrderPaymentInstrument): SalesforcePaymentDetails
Returns the details to the Salesforce Payments payment for this PayPal order, using the given payment instrument.
Parameters:
- paymentInstrument - payment instrument
Returns:
- The payment details
- getPaymentInstrument(basket: Basket): OrderPaymentInstrument
Returns the payment instrument for this PayPal order in the given basket, or
nullif the given basket has none.Parameters:
- basket - basket
Returns:
- basket payment instrument
- getPaymentInstrument(order: Order): OrderPaymentInstrument
Returns the payment instrument for this PayPal order in the given order, or
nullif the given order has none.Parameters:
- order - order
Returns:
- order payment instrument
- getShipping(): SalesforcePayPalOrderAddress
Returns the shipping address for this PayPal order, or
nullif not known.Returns:
- order shipping address
- isCompleted(): Boolean
Returns
trueif this PayPal order has been completed, orfalseif not.Returns:
trueif this PayPal order has been completed