You are here

function commerce_paypal_wpp_payment_action in Commerce PayPal 7

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.

1 call to commerce_paypal_wpp_payment_action()
commerce_paypal_wpp_submit_form_submit in modules/wpp/commerce_paypal_wpp.module
Payment method callback: checkout form submission.

File

modules/wpp/commerce_paypal_wpp.module, line 564
Implements PayPal Website Payments Pro in Drupal Commerce checkout.

Code

function commerce_paypal_wpp_payment_action($txn_type) {
  switch ($txn_type) {
    case COMMERCE_CREDIT_AUTH_ONLY:
      return 'Authorization';
    case COMMERCE_CREDIT_AUTH_CAPTURE:
      return 'Sale';
  }
}