MediaWiki fundraising/REL1_35
|
Describes payment methods. More...
Public Member Functions | |
getFamily () | |
Get the high-level family for this method. | |
getMethodMeta () | |
Get the gateway's specification for this payment method. | |
getUtmSourceName () | |
isCompletelySpecified () | |
TODO: implement this function. | |
isInstanceOf ( $ancestor) | |
Static Public Member Functions | |
static | newFromCompoundName (GatewayType $gateway, $method_name, $submethod_name, $is_recurring) |
Build a new PaymentMethod object from an name pair. | |
static | parseCompoundMethod ( $bareMethod, $subMethod) |
Process an old-style payment method/submethod name into the unique form. | |
Protected Member Functions | |
getParent () | |
Protected Attributes | |
GatewayType | $gateway |
bool | $is_recurring |
string | $name |
array | $spec |
Gateway definition for this payment method. | |
Describes payment methods.
This currently bridges old and new code, by allowing payment methods to be referenced by legacy (method, submethod) strings, or by a new, unique name for each method. Examples of how these will compare:
Compound (old) Unique (new) Family (new) ew, ew_yandex ew_yandex ew cc, visa cc_visa cc paypal, paypal paypal paypal
We are deprecating the "submethod" distinction, dealing with methods should be simplified by referring to a single PaymentMethod object. The concept of a "family" becomes more important, this roughly maps to the donor's intended payment experience, and is the field we use for most reporting.
Definition at line 21 of file PaymentMethod.php.
PaymentMethod::getFamily | ( | ) |
Get the high-level family for this method.
Definition at line 148 of file PaymentMethod.php.
Referenced by getUtmSourceName().
PaymentMethod::getMethodMeta | ( | ) |
Get the gateway's specification for this payment method.
Definition at line 114 of file PaymentMethod.php.
References $spec.
|
protected |
Definition at line 159 of file PaymentMethod.php.
References newFromCompoundName().
PaymentMethod::getUtmSourceName | ( | ) |
Definition at line 169 of file PaymentMethod.php.
References $source, and getFamily().
PaymentMethod::isCompletelySpecified | ( | ) |
TODO: implement this function.
Definition at line 122 of file PaymentMethod.php.
PaymentMethod::isInstanceOf | ( | $ancestor | ) |
string | $ancestor |
Definition at line 132 of file PaymentMethod.php.
|
static |
Build a new PaymentMethod object from an name pair.
GatewayType | $gateway | |
string | $method_name | |
string | $submethod_name | |
bool | $is_recurring |
Definition at line 53 of file PaymentMethod.php.
References $gateway, $is_recurring, $spec, GatewayType\getPaymentMethodMeta(), GatewayType\getPaymentSubmethodMeta(), and parseCompoundMethod().
Referenced by getParent(), and DonationData\setUtmSource().
|
static |
Process an old-style payment method/submethod name into the unique form.
For now, this just eliminates duplicated method-submethods.
string | $bareMethod | old-style payment method |
string | $subMethod | old-style payment submethod |
Definition at line 95 of file PaymentMethod.php.
Referenced by newFromCompoundName().
|
protected |
Definition at line 25 of file PaymentMethod.php.
Referenced by newFromCompoundName().
|
protected |
Definition at line 35 of file PaymentMethod.php.
Referenced by newFromCompoundName().
|
protected |
Definition at line 30 of file PaymentMethod.php.
|
protected |
Gateway definition for this payment method.
Definition at line 41 of file PaymentMethod.php.
Referenced by getMethodMeta(), and newFromCompoundName().