function commerce_paypal_payment_action in Commerce PayPal 7.2
Returns the relevant PayPal payment action for a given transaction type.
Parameters
$txn_type: The type of transaction whose payment action should be returned; currently supports COMMERCE_CREDIT_AUTH_CAPTURE and COMMERCE_CREDIT_AUTH_ONLY.
3 calls to commerce_paypal_payment_action()
- commerce_paypal_ec_do_payment in modules/
ec/ commerce_paypal_ec.module - Confirm an Express Checkout payment for an order for the specified charge amount with a DoExpressCheckoutPayment API request.
- commerce_paypal_ec_set_express_checkout in modules/
ec/ commerce_paypal_ec.module - Submits a SetExpressCheckout request to PayPal for the given order.
- commerce_paypal_wpp_submit_form_submit in modules/
wpp/ commerce_paypal_wpp.module - Payment method callback: checkout form submission.
File
- ./
commerce_paypal.module, line 457 - Implements PayPal payment services for use with Drupal Commerce.
Code
function commerce_paypal_payment_action($txn_type) {
switch ($txn_type) {
case COMMERCE_CREDIT_AUTH_ONLY:
return 'Authorization';
case COMMERCE_CREDIT_AUTH_CAPTURE:
return 'Sale';
}
}