PaymentMethod.php 980 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace Braintree;
  3. /**
  4. * Braintree PaymentMethod module
  5. *
  6. * @package Braintree
  7. * @category Resources
  8. */
  9. /**
  10. * Creates and manages Braintree PaymentMethods
  11. *
  12. * <b>== More information ==</b>
  13. *
  14. *
  15. * @package Braintree
  16. * @category Resources
  17. */
  18. class PaymentMethod extends Base
  19. {
  20. // static methods redirecting to gateway
  21. public static function create($attribs)
  22. {
  23. return Configuration::gateway()->paymentMethod()->create($attribs);
  24. }
  25. public static function find($token)
  26. {
  27. return Configuration::gateway()->paymentMethod()->find($token);
  28. }
  29. public static function update($token, $attribs)
  30. {
  31. return Configuration::gateway()->paymentMethod()->update($token, $attribs);
  32. }
  33. public static function delete($token, $options=[])
  34. {
  35. return Configuration::gateway()->paymentMethod()->delete($token, $options);
  36. }
  37. }
  38. class_alias('Braintree\PaymentMethod', 'Braintree_PaymentMethod');