You are here

public function CommerceLicenseRemoteBase::checkoutCompletionMessage in Commerce License 7

Overrides CommerceLicenseBase::checkoutCompletionMessage().

Overrides CommerceLicenseBase::checkoutCompletionMessage

File

includes/plugins/license_type/base.inc, line 449
Abstract and interface plugin implementation.

Class

CommerceLicenseRemoteBase
Remote license base class.

Code

public function checkoutCompletionMessage() {
  $message = '';
  $sync_status = $this->wrapper->sync_status
    ->value();
  switch ($sync_status) {
    case COMMERCE_LICENSE_NEEDS_SYNC:
      $message = t("Please wait while we're contacting the remote service...");
      break;
    case COMMERCE_LICENSE_SYNCED:
      $message = 'Your license has been successfully created: <br />';
      $message .= $this
        ->accessDetails();
      break;
    case COMMERCE_LICENSE_SYNC_FAILED_RETRY:
      $message = t('Your license has been queued for processing.');
      break;
    case COMMERCE_LICENSE_SYNC_FAILED:
      $message = t('Oops... We were unable to generate your credentials.');
      break;
  }
  return $message;
}