File tree Expand file tree Collapse file tree 14 files changed +185
-1
lines changed
Expand file tree Collapse file tree 14 files changed +185
-1
lines changed Original file line number Diff line number Diff line change 22composer.lock
33composer.phar
44phpunit.xml
5+ .directory
6+ reports /
7+ documents /
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ mkdir -p ./reports
4+ mkdir -p ./documents/apigen
5+
6+ if [ -z " $1 " ]; then
7+ apigen \
8+ --title ' Onmipay Common API documentation' \
9+ --source ./src \
10+ --destination ./documents/apigen \
11+ --report ./reports/apigen.xml
12+
13+ #
14+ # Left here for further expansion, ignore this for the time being.
15+ #
16+ elif [ " $1 " = " common" ]; then
17+ apigen \
18+ --title ' Omnipay Common API documentation' \
19+ --source ./src/Omnipay/Common \
20+ --destination ./documents/apigen \
21+ --report ./reports/apigen.xml
22+
23+ fi
Original file line number Diff line number Diff line change 11<?php
2+ /**
3+ * Base payment gateway class
4+ */
25
36namespace Omnipay \Common ;
47
912
1013/**
1114 * Base payment gateway class
15+ *
16+ * This abstract class should be extended by all payment gateways
17+ * throughout the Omnipay system. It enforces implementation of
18+ * the GatewayInterface interface and defines various common attibutes
19+ * and methods that all gateways should have.
1220 */
1321abstract class AbstractGateway implements GatewayInterface
1422{
Original file line number Diff line number Diff line change 11<?php
2+ /**
3+ * Credit Card class
4+ */
25
36namespace Omnipay \Common ;
47
912
1013/**
1114 * Credit Card class
15+ *
16+ * This class defines and abstracts all of the credit card types used
17+ * throughout the Omnipay system.
1218 */
1319class CreditCard
1420{
Original file line number Diff line number Diff line change 11<?php
2+ /**
3+ * Currency class
4+ */
25
36namespace Omnipay \Common ;
47
58/**
69 * Currency class
10+ *
11+ * This class abstracts certain functionality around currency objects,
12+ * currency codes and currency numbers relating to global currencies used
13+ * in the Omnipay system.
714 */
815class Currency
916{
Original file line number Diff line number Diff line change 11<?php
2+ /**
3+ * Omnipay Gateway Factory class
4+ */
25
36namespace Omnipay \Common ;
47
58use Guzzle \Http \ClientInterface ;
69use Omnipay \Common \Exception \RuntimeException ;
710use Symfony \Component \HttpFoundation \Request as HttpRequest ;
811
12+ /**
13+ * Omnipay Gateway Factory class
14+ *
15+ * This class abstracts a set of gateways that can be independently
16+ * registered, accessed, and used.
17+ */
918class GatewayFactory
1019{
20+ /**
21+ * Internal storage for all available gateways
22+ *
23+ * @var array
24+ */
1125 private $ gateways = array ();
1226
1327 /**
Original file line number Diff line number Diff line change 11<?php
2+ /**
3+ * Payment gateway interface
4+ */
25
36namespace Omnipay \Common ;
47
58/**
69 * Payment gateway interface
10+ *
11+ * This interface class defines the standard functions that any
12+ * Omnipay gateway needs to define.
713 */
814interface GatewayInterface
915{
Original file line number Diff line number Diff line change 11<?php
2+ /**
3+ * Helper class
4+ */
25
36namespace Omnipay \Common ;
47
58/**
69 * Helper class
10+ *
11+ * This class defines various static utility functions that are in use
12+ * throughout the Omnipay system.
713 */
814class Helper
915{
1016 /**
1117 * Convert a string to camelCase. Strings already in camelCase will not be harmed.
18+ *
19+ * @param string $str The input string
20+ * @return string camelCased output string
1221 */
1322 public static function camelCase ($ str )
1423 {
@@ -88,6 +97,9 @@ public static function getGatewayShortName($className)
8897 * Stripe => \Omnipay\Stripe\Gateway
8998 * PayPal\Express => \Omnipay\PayPal\ExpressGateway
9099 * PayPal_Express => \Omnipay\PayPal\ExpressGateway
100+ *
101+ * @param string $shortName The short gateway name
102+ * @return string The fully namespaced gateway class name
91103 */
92104 public static function getGatewayClassName ($ shortName )
93105 {
Original file line number Diff line number Diff line change 11<?php
2+ /**
3+ * Issuer
4+ */
25
36namespace Omnipay \Common ;
47
58/**
69 * Issuer
10+ *
11+ * This class abstracts some functionality around card issuers used in the
12+ * Omnipay system.
713 */
814class Issuer
915{
16+ /**
17+ * The identifier of the issuer.
18+ *
19+ * @var string
20+ */
1021 protected $ id ;
22+
23+ /**
24+ * The full name of the issuer.
25+ *
26+ * @var string
27+ */
1128 protected $ name ;
29+
30+ /**
31+ * The ID of a payment method that the issuer belongs to.
32+ *
33+ * @see PaymentMethod
34+ *
35+ * @var string
36+ */
1237 protected $ paymentMethod ;
1338
1439 /**
1540 * Create a new Issuer
1641 *
42+ * @see PaymentMethod
43+ *
1744 * @param string $id The identifier of this issuer
1845 * @param string $name The name of this issuer
1946 * @param string|null $paymentMethod The ID of a payment method this issuer belongs to
@@ -48,6 +75,8 @@ public function getName()
4875 /**
4976 * The ID of a payment method this issuer belongs to
5077 *
78+ * @see PaymentMethod
79+ *
5180 * @return string
5281 */
5382 public function getPaymentMethod ()
Original file line number Diff line number Diff line change 11<?php
2+ /**
3+ * Cart Item
4+ */
25
36namespace Omnipay \Common ;
47
58use Symfony \Component \HttpFoundation \ParameterBag ;
69
710/**
811 * Cart Item
12+ *
13+ * This class defines a single cart item in the Omnipay system.
14+ *
15+ * @see ItemInterface
916 */
1017class Item implements ItemInterface
1118{
You can’t perform that action at this time.
0 commit comments