[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/phortune/exception/ -> PhortuneMultiplePaymentProvidersException.php (source)

   1  <?php
   2  
   3  final class PhortuneMultiplePaymentProvidersException extends Exception {
   4  
   5    public function __construct(PhortunePaymentMethod $method, array $providers) {
   6      assert_instances_of($providers, 'PhortunePaymentProvider');
   7      $type = $method->getMetadataValue('type');
   8  
   9      $provider_names = array();
  10      foreach ($providers as $provider) {
  11        $provider_names[] = get_class($provider);
  12      }
  13  
  14      return parent::__construct(
  15        "More than one payment provider can handle charging payments for this ".
  16        "payment method. This is ambiguous and likely indicates that a payment ".
  17        "provider is not properly implemented. You may be able to use a ".
  18        "different payment method to complete this transaction. The payment ".
  19        "method type is '{$type}'. The providers claiming to handle it are: ".
  20        implode(', ', $provider_names).'.');
  21    }
  22  
  23  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1