MediaWiki fundraising/REL1_35
|
Public Member Functions | ||||
cancel () | ||||
Cancel payment based on adapter and set status to cancelled. | ||||
curl_transaction ( $data) | ||||
Make an API call to Ingenico Connect. | ||||
defineOrderIDMeta () | ||||
Sets up the $order_id_meta array. | ||||
defineTransactions () | ||||
Define transactions. | ||||
do_transaction ( $transaction) | ||||
Because GC has some processes that involve more than one do_transaction chained together, we're catching those special ones in an overload and letting the rest behave normally. | ||||
doPayment () | ||||
Attempt the default transaction for the current DonationData. | ||||
getCommunicationType () | ||||
Data format for outgoing requests to the processor. | ||||
getPaymentMethodsSupportingRecurringConversion () | ||||
Should return an array of payment methods that support setting up a recurring donation after a one-time donation via this gateway. | ||||
getRequestProcessId ( $requestValues) | ||||
Gateways which return true from isReturnProcessingRequired must override this with logic to get an ID from the request which will identify repeated attempts to process the same payment. | ||||
getResponseType () | ||||
Default response type to be the same as communication type. | ||||
parseResponseCommunicationStatus ( $response) | ||||
Parse the response to get the status. | ||||
parseResponseData ( $response) | ||||
Harvest the data we need back from the gateway. | ||||
parseResponseErrors ( $response) | ||||
Parse the response to get the errors in a format we can log and otherwise deal with. | ||||
processDonorReturn ( $requestValues) | ||||
Default implementation sets status to complete. | ||||
shouldRectifyOrphan () | ||||
Allows adapters to specify logic as to whether an orphan can be rectified. | ||||
Public Member Functions inherited from GlobalCollectAdapter | ||||
cancelSubscription () | ||||
Cancel a subscription. | ||||
checkDoBankValidation (&$data) | ||||
Interpret DO_BANKVALIDATION checks performed. | ||||
defineAccountInfo () | ||||
Define accountInfo. | ||||
defineReturnValueMap () | ||||
Define return_value_map. | ||||
doRefund () | ||||
Refunds a transaction. | ||||
generateOrderID ( $dataObj=null) | ||||
Override parent function to disallow order IDs starting with 4 or 7, which can collide with those created via the Connect API (as implemented in the 'Ingenico' adapter) Default orderID generation This used to be done in DonationData, but gateways should control the format here.Override this in child classes.
| ||||
getAvailableLanguages () | ||||
OUR language codes which are available to use in GlobalCollect. | ||||
getAVSResult () | ||||
getAVSResult is intended to be used by the functions filter, to determine if we want to fail the transaction ourselves or not. | ||||
getCVVResult () | ||||
getCVVResult is intended to be used by the functions filter, to determine if we want to fail the transaction ourselves or not. | ||||
getTransactionDataFormAction () | ||||
Used by ewallets, rtbt, and cash (boletos) to retrieve the URL we should be posting the form data to. | ||||
stageData () | ||||
Run any staging DataTransformers configured for the adapter. | ||||
Public Member Functions inherited from GatewayAdapter | ||||
__construct ( $options=[]) | ||||
Constructor. | ||||
addRequestData ( $dataArray) | ||||
A helper function to let us stash extra data after the form has been submitted. | ||||
addResponseData ( $dataArray) | ||||
Add data from the processor to staged_data and run any unstaging functions. | ||||
addStandardMessageFields ( $transaction) | ||||
For making freeform queue messages. | ||||
buildOrderIDSources () | ||||
buildOrderIDSources: Uses the 'alt_locations' array in the order id metadata, to build an array of all possible candidates for order_id. | ||||
buildRequestParams () | ||||
Build the parameters sent with the next request. | ||||
calculateKeyMashScore ( $stringToCheck) | ||||
checkTokens () | ||||
Checks the edit tokens in the user's session against the one gathered from populated form data. | ||||
createDonorReturnParams () | ||||
Takes normalized data and creates adapter specific params for processDonorReturn. | ||||
defineDataTransformers () | ||||
Sets up the $data_transformers array. | ||||
definePaymentMethods () | ||||
Sets up the $payment_methods array. | ||||
finalizeInternalStatus ( $status) | ||||
Sets the final payment status. | ||||
findCodeAction ( $transaction, $key, $code) | ||||
findCodeAction | ||||
formatStagedData () | ||||
Format staged data. | ||||
getAccountConfig ( $key) | ||||
Get globals-based configuration setting. | ||||
getAvailableSubmethods () | ||||
Get metadata for all available submethods, given current method / country TODO: A PaymentMethod should be able to list its child options. | ||||
getClientSideValidationRules () | ||||
Returns an array of rules used to validate data before submission. | ||||
getConfig ( $key=null) | ||||
Get settings loaded from adapter's config directory. | ||||
getCoreDataTransformers () | ||||
getCurrencies ( $options=[]) | ||||
getCurrentTransaction () | ||||
Gets the currently set transaction name. | ||||
getData_Unstaged_Escaped ( $val='') | ||||
This is the ONLY getData type function anything should be using outside the adapter. | ||||
getDataConstraints ( $field) | ||||
Get any known constraints on the field's value. | ||||
getDataSources () | ||||
getDataTransformers () | ||||
FIXME: Not convinced we need this. | ||||
getDonationRules () | ||||
Add donation rules for the users country & currency combo. | ||||
getErrorMap ( $code, $options=[]) | ||||
getErrorMap | ||||
getErrorMapByCodeAndTranslate ( $code) | ||||
getErrorMapByCodeAndTranslate | ||||
getErrorState () | ||||
Return any errors that prevent this transaction from continuing. | ||||
getFinalStatus () | ||||
If it has been set: returns the final payment status in the $final_status member variable.This is the one we care about for switching on overall behavior. Otherwise, returns false.
| ||||
getFormFields ( $knownData=null) | ||||
Build list of form fields TODO: Determine if this ever needs to be overridden per gateway, or if all the per-country / per-gateway cases can be expressed declaratively in payment method / submethod metadata. | ||||
getGatewayAdapterClass () | ||||
getLogDebugJSON () | ||||
Returns some useful debugging JSON we can append to loglines for increased debugging happiness. | ||||
getLogMessagePrefix () | ||||
Get the log message prefix: $contribution_tracking_id . | ||||
getMerchantID () | ||||
For places that might need the merchant ID outside of the adapter. | ||||
getMonthlyConvertAmounts () | ||||
Add the suggested monthly donation amounts for each donation level according to the currency saved in session for this donation attempt. | ||||
getOrderIDMeta ( $key=false) | ||||
Returns information about how to manage the Order ID, either a specific value or the whole associative array. | ||||
getPaymentMethod () | ||||
Get the payment method. | ||||
getPaymentMethodMeta ( $payment_method=null) | ||||
Get metadata for the specified payment method as set in. | ||||
getPaymentMethods () | ||||
Define payment methods. | ||||
getPaymentSubmethod () | ||||
Get the name of the currently selected payment submethod. | ||||
getPaymentSubmethodMeta ( $payment_submethod=null) | ||||
Get metadata for the specified payment submethod. | ||||
getPaymentSubmethods () | ||||
Get the entire list of payment submethod definitions. | ||||
getRequiredFields ( $knownData=null) | ||||
getScoreCountryMap () | ||||
This custom filter function checks the global variable: | ||||
getScoreEmailDomainMap () | ||||
This custom filter function checks the global variable: | ||||
getScoreName () | ||||
This custom filter function checks the global variable: wgDonationInterfaceNameFilterRules Each entry in that array has keys KeyMapA, KeyMapB: define keyboard zones GibberishWeight: threshold fraction of name letters in a single zone Score: added to the total fraud score when this threshold is exceeded. | ||||
getScoreUtmCampaignMap () | ||||
This custom filter function checks the global variable: | ||||
getScoreUtmMediumMap () | ||||
This custom filter function checks the global variable: | ||||
getScoreUtmSourceMap () | ||||
This custom filter function checks the global variable: | ||||
getTransactionData () | ||||
Returns the FORMATTED data harvested from the reply, or false if it is not set. | ||||
getTransactionMessage () | ||||
getTransactionResponse () | ||||
Returns the response object with the details of the latest transaction, or null if the adapter has not yet performed one. | ||||
getTransactionSpecificValue ( $gateway_field_name) | ||||
This function is used exclusively by the two functions that build requests to be sent directly to external payment gateway servers. | ||||
getTransactionStatus () | ||||
Returns the transaction communication status, or false if not set present. | ||||
getValidationAction () | ||||
Returns the current validation action. | ||||
isBatchProcessor () | ||||
Lets the outside world (particularly filters that accumulate points scores) know if we are a batch processor. | ||||
isReturnProcessingRequired () | ||||
Whether donation processing depends on additional processing on-wiki at the donor's return from a payment processor. | ||||
loadConfig ( $variant=null) | ||||
localizeGlobal ( $varname) | ||||
Gets a global variable according to. | ||||
logFinalStatus ( $status) | ||||
Easily-child-overridable log component of setting the final transaction status, which will only ever be set at the very end of a transaction workflow. | ||||
logPending () | ||||
Dump info about a transaction in logs and pending queues before sending the donor off to complete it. | ||||
normalizeOrderID ( $override=null, $dataObj=null) | ||||
This function is meant to be run by the DonationData class, both before and after any communication has been done that might retrieve an order ID. | ||||
rectifyOrphan () | ||||
Looks at message to see if it should be rectified Allows exit if the adapter should not rectify the orphan Then tries to see if the orphan can be matched. | ||||
regenerateOrderID () | ||||
runAntifraudFilters () | ||||
Runs all the fraud filters that have been enabled and configured in donationdata.php and/or LocalSettings.php This function is most likely to be called through executeFunctionIfExists, early on in do_transaction. | ||||
sendFinalStatusMessage ( $status) | ||||
Build and send a message to the payments-init queue, once the initial workflow is complete. | ||||
session_addDonorData () | ||||
Removes any old donor data from the session, and adds the current set. | ||||
session_ensure () | ||||
session_ensure Ensure that we have a session set for the current user. | ||||
session_getData ( $key, $subkey=null) | ||||
Retrieve data from the session if it's set, and null if it's not. | ||||
session_hasDonorData () | ||||
Checks to see if we have donor data in our session. | ||||
session_killAllEverything () | ||||
This should kill the session as hard as possible. | ||||
session_resetForNewAttempt ( $force=false) | ||||
For those times you want to have the user functionally start over without, you know, cutting your entire head off like you do with session_unsetAllData(). | ||||
session_setDonorBackupData (array $donorData) | ||||
Saves a backup of the Donor Data in session. | ||||
session_unsetAllData () | ||||
Destroys the session completely. | ||||
session_unsetDonorData () | ||||
Unsets the session data, in the case that we've saved it for gateways like GlobalCollect that require it to persist over here through their iframe experience. | ||||
setCurrentTransaction ( $transaction_name) | ||||
Sets the transaction you are about to send to the payment gateway. | ||||
setHash ( $hashval) | ||||
Set a value used to determine whether data has changed. | ||||
setOrderIDMeta ( $key, $value) | ||||
sets more orderID Meta, so we can remember things about what we chose to go with in later logic. | ||||
setRiskScore ( $score) | ||||
Set the adapter's fraud score. | ||||
setValidationAction ( $action, $reset=false) | ||||
Sets the current validation action. | ||||
showMonthlyConvert () | ||||
token_getSaltedSessionToken () | ||||
Establish an 'edit' token to help prevent CSRF, etc. | ||||
unsetHash () | ||||
Clear the data hash value. | ||||
unstageKeys ( $processor_data, $key_map=null) | ||||
Change the keys on this data from processor API names to normalized names. | ||||
validate () | ||||
Check donation data for validity and set errors. | ||||
validatedOK () | ||||
Public Member Functions inherited from RecurringConversion | ||||
doRecurringConversion () | ||||
If we have just made a one-time donation that is possible to convert to recurring, do the conversion. | ||||
Public Attributes | |
const | GATEWAY_NAME = 'Ingenico' |
const | GLOBAL_PREFIX = 'wgIngenicoGateway' |
const | IDENTIFIER = 'ingenico' |
Public Attributes inherited from GlobalCollectAdapter | |
const | GATEWAY_NAME = 'Global Collect' |
const | GLOBAL_PREFIX = 'wgGlobalCollectGateway' |
const | IDENTIFIER = 'globalcollect' |
Public Attributes inherited from GatewayAdapter | |
string[] | $debugarray |
bool | $log_outbound = false |
This should be set to true for gateways that don't return the request in the response. | |
bool | $posted = false |
A boolean that will tell us if we've posted to ourselves. | |
const | COMPLETED_PREFACE = 'Completed donation: ' |
const | DONOR = 'Donor' |
const | DONOR_BKUP = 'Donor_BKUP' |
const | GATEWAY_NAME = 'Donation Gateway' |
const | GLOBAL_PREFIX = 'wgDonationGateway' |
const | IDENTIFIER = 'donation' |
const | REDIRECT_PREFACE = 'Redirecting for transaction: ' |
Don't change these strings without fixing cross-repo usages. | |
Protected Member Functions | |
approvePayment () | |
getGatewayTransactionId () | |
getOrderStatusFromProcessor () | |
getPaymentProvider () | |
getStatusCode ( $txnData) | |
Get gateway status code from unstaged data. | |
post_process_getHostedPaymentStatus () | |
setGatewayDefaults ( $options=[]) | |
Setting some Ingenico-specific defaults. | |
tuneForRecurring () | |
Stage: recurring Adds the recurring payment pieces to the structure of createHostedCheckout and getHostedPaymentStatus if the recurring field is populated. | |
Protected Member Functions inherited from GlobalCollectAdapter | |
addKeysToTransactionForSubmethod ( $payment_submethod) | |
Add keys to transaction for submethod TODO: Candidate for pushing to the base class. | |
addKeyToTransaction ( $value, $section='PAYMENT') | |
Add a key to the transaction INSERT_ORDERWITHPAYMENT. | |
cancelCreditCardPayment ( $status=FinalStatus::FAILED) | |
curlResponseIsValidFormat ( $curl_response) | |
Check if the curl_response is something we can process. | |
finalizeCreditCardPayment ( $statusCode) | |
getBankList () | |
Update the list of banks for realtime bank transfer. | |
handleCreditCardProblem ( $problem) | |
post_process_get_orderstatus () | |
hook pre_process for GET_ORDERSTATUS | |
processResponse ( $response) | |
Process the response and set transaction_response properties. | |
transactionDirect_Debit () | |
transactionRecurring_Charge () | |
Process a non-initial effort_id charge. | |
tuneConstraints () | |
Set up method-specific constraints. | |
tuneForCountry () | |
Stage: country This should be a catch-all for establishing weird country-based rules. | |
tuneForMethod () | |
xmlGetChecks ( $response) | |
Parse the response object for the checked validations. | |
Protected Member Functions inherited from GatewayAdapter | |
addCodeRange ( $transaction, $key, $action, $lower, $upper=null) | |
addCodeRange is used to define ranges of response codes for major gateway transactions, that let us know what status bucket to sort them into. | |
addContactMessageFields ( $message) | |
IMPORTANT: only add the contact_id to a message if the contact_hash is preset. | |
appendNodeIfValue ( $value, &$node) | |
appendNodeIfValue is a helper function for buildTransactionNodes, which is used by buildRequestXML to construct an XML transaction. | |
buildRequestArray () | |
buildRequestNameValueString () | |
Builds a set of transaction data in name/value format *)The current transaction must be set before you call this function. | |
buildRequestXML ( $rootElement='XML', $encoding='UTF-8') | |
Builds a set of transaction data in XML format *)The current transaction must be set before you call this function. | |
buildTransactionNodes ( $structure, &$node) | |
buildRequestXML helper function. | |
cleanTransactionStructureForLogs ( $structure, $never_log) | |
Recursively sink through a transaction structure array to remove all nodes that we can't have showing up in the server logs. | |
curl_errno ( $ch) | |
Wrapper for the real curl_errno so we can override with magic for unit tests. | |
curl_exec ( $ch) | |
Wrapper for the real curl_exec so we can override with magic for unit tests. | |
curl_getinfo ( $ch) | |
Wrapper for the real curl_getinfo so we can override with magic for unit tests. | |
defineDataConstraints () | |
TODO: see comment on definePaymentMethods. | |
defineErrorMap () | |
Define the message keys used to display errors to the user. | |
defineVarMap () | |
defineVarMap needs to set up the $var_map array. | |
doQueueTransaction () | |
Sends a queue message to the configured server and queue, based on the outcome of our current transaction. | |
ensureUniqueOrderID () | |
executeIfFunctionExists ( $function_name, $parameter=null) | |
Executes the specified function in $this, if one exists. | |
fallbackToDefaultCurrency () | |
Called when a currency code error exists. | |
findAccount () | |
Determine which account to use for this session. | |
formatXmlString ( $xml) | |
To avoid reinventing the wheel: taken from http://recursive-design.com/blog/2007/04/05/format-xml-with-php/. | |
getCurlBaseHeaders () | |
getCurlBaseOpts () | |
getData_Staged ( $val='') | |
Returns staged data from the adapter object, or null if a key was specified and no value exists. | |
getFailedValidationResponse () | |
getFormattedResponse ( $rawResponse) | |
Take the entire response string, and strip everything we don't care about. | |
getProcessorUrl () | |
Return the base URL to use for the current transaction. | |
getQueueContactMessage () | |
getQueueDonationMessage () | |
Collect donation details and normalize keys for pending or donations queue. | |
getTransactionRequestStructure () | |
Returns the current transaction request structure if it exists, otherwise returns false. | |
incrementNumAttempt () | |
Adds one to the 'numAttempt' field we use to keep track of how many times a donor has attempted a payment, in a session. | |
incrementSequenceNumber () | |
Some payment gateways require a distinct identifier for each API call or for each new payment attempt, even if retrying an attempt that failed validation. | |
isMonthlyConvertCountry () | |
Check if currency is in the list for $wgDonationInterfaceMonthlyConvertCountries. | |
logCompletedPayment () | |
logPaymentDetails ( $preface=self::REDIRECT_PREFACE) | |
postProcessDonation () | |
Runs all the post-process logic that has been enabled and configured in donationdata.php and/or LocalSettings.php, including the queue message. | |
pushMessage ( $queue, $contactOnly=false) | |
NOTE: Adyen Checkout has it's own pushMessage that does not push recurring iDEALs to the donations queue. | |
refreshGatewayValueFromSource ( $val) | |
Instead of pulling all the DonationData back through to update one local value, use this. | |
runSessionVelocityFilter () | |
sendPendingMessage () | |
session_resetOnSwitch () | |
Check to see if donor is making a repeated attempt that is incompatible with the previous attempt, such as a gateway changes. | |
stripXMLResponseHeaders ( $rawResponse) | |
token_checkTokens () | |
token_checkTokens The main function to check the salted and MD5'd token we should have saved and gathered from the request, against the clear-text token we should have saved to the user's session. | |
token_matchEditToken ( $val) | |
token_matchEditToken Determine the validity of a token by checking it against the salted version of the clear-text token we have already stored in the session. | |
token_refreshAllTokenEverything () | |
token_refreshAllTokenEverything In the case where we have an expired session (token mismatch), we go ahead and fix it for 'em for their next post. | |
transaction_option ( $option_value) | |
If there are things about a transaction that we need to stash in the transaction's definition (defined in a local defineTransactions() ), we can recall them here. | |
trimFieldToConstraints ( $value, $field) | |
Trims a single field according to length constraints in data_constraints.yaml. | |
unstageData () | |
Run any unstaging functions to decode processor responses. | |
validateDataConstraintsMet ( $field, $value) | |
Validates that the gateway-specific data constraints for this field have been met. | |
xmlChildrenToArray ( $xml, $nodename) | |
Additional Inherited Members | |
Static Public Member Functions inherited from GatewayAdapter | |
static | getEnabledGateways (Config $mwConfig) |
Return an array of all the currently enabled gateways. | |
static | getGatewayName () |
Gets the name of the payment processor, e.g. | |
static | getGlobal ( $varname) |
This function is important. | |
static | getGlobalPrefix () |
static | getIdentifier () |
Get a general purpose identifier for this processor, e.g. | |
static | getLogIdentifier () |
Get a tag to use to identify this adapter in logs, e.g. | |
static | token_generateToken ( $padding='') |
token_generateToken Generate a random string to be used as an edit token. | |
Static Protected Member Functions inherited from GatewayAdapter | |
static | token_applyMD5AndSalt ( $clear_token) |
token_applyMD5AndSalt Takes a clear-text token, and returns the MD5'd result of the token plus the configured gateway salt. | |
Protected Attributes inherited from GatewayAdapter | |
$account_config | |
$account_name | |
$accountInfo | |
string | $action |
$batch = false | |
array | $config = [] |
config tree | |
string | $current_transaction |
Name of the current transaction. | |
StagingHelper ValidationHelper[] | $data_transformers = [] |
Data transformation helpers. | |
array | $dataConstraints = [] |
$dataConstraints provides information on how to handle variables. | |
DonationData | $dataObj |
array | $error_map = [] |
$error_map Reference map from gateway error to client error. | |
ErrorState | $errorState |
List of errors preventing this transaction from continuing. | |
string | $final_status |
When the smoke clears, this should be set to one of the constants defined in. | |
Psr Log LoggerInterface | $logger |
Standard logger, logs to {type}_gateway. | |
$order_id_candidates | |
$order_id_meta | |
Psr Log LoggerInterface | $payment_init_logger |
Logs to {type}_gateway_payment_init. | |
array | $payment_methods = [] |
$payment_methods will be defined by the adapter. | |
array | $payment_submethods = [] |
$payment_submethods will be defined by the adapter (or will default to an empty array if none are defined). | |
DonationProfiler | $profiler |
Times and logs various operations. | |
$return_value_map | |
int | $risk_score = 0 |
$staged_data | |
PaymentTransactionResponse | $transaction_response |
$transaction_response is the member var that keeps track of the results of the latest discrete transaction with the gateway. | |
$transactions | |
$unstaged_data | |
array | $var_map = [] |
$var_map maps gateway variables to client variables | |
DomDocument | $xmlDoc |
For gateways that speak XML, we use this variable to hold the document while we build the outgoing request. | |
Definition at line 8 of file ingenico.adapter.php.
|
protected |
Reimplemented from GlobalCollectAdapter.
Definition at line 370 of file ingenico.adapter.php.
References do_transaction().
IngenicoAdapter::cancel | ( | ) |
Cancel payment based on adapter and set status to cancelled.
Reimplemented from GatewayAdapter.
Definition at line 406 of file ingenico.adapter.php.
References do_transaction().
IngenicoAdapter::curl_transaction | ( | $data | ) |
Make an API call to Ingenico Connect.
array | $data | parameters for the transaction |
Reimplemented from GatewayAdapter.
Definition at line 193 of file ingenico.adapter.php.
References GatewayAdapter\getCurrentTransaction(), GatewayAdapter\getData_Unstaged_Escaped(), getPaymentProvider(), and GatewayAdapter\runSessionVelocityFilter().
IngenicoAdapter::defineOrderIDMeta | ( | ) |
Sets up the $order_id_meta array.
Should contain the following keys/values: 'alt_locations' => [ $dataset_name, $dataset_key ] //ordered 'type' => numeric, or alphanumeric 'length' => $max_charlen
Reimplemented from GlobalCollectAdapter.
Definition at line 165 of file ingenico.adapter.php.
IngenicoAdapter::defineTransactions | ( | ) |
Define transactions.
Please do not add more transactions to this array.
This method should define:
Reimplemented from GlobalCollectAdapter.
Definition at line 41 of file ingenico.adapter.php.
IngenicoAdapter::do_transaction | ( | $transaction | ) |
Because GC has some processes that involve more than one do_transaction chained together, we're catching those special ones in an overload and letting the rest behave normally.
Because GC has some processes that involve more than one do_transaction chained together, we're catching those special ones in an overload and letting the rest behave normally.Performs a transaction through the gateway.Optionally may reattempt the transaction if a recoverable gateway error occurred.This function provides all functionality to the external world to communicate with a properly constructed gateway and handle all the return data in an appropriate manner. – Appropriateness is determined by the requested $transaction structure and definition.
string | $transaction | The specific transaction type, like 'INSERT_ORDERWITHPAYMENT', that maps to a first-level key in the $transactions array. |
Reimplemented from GlobalCollectAdapter.
Definition at line 236 of file ingenico.adapter.php.
References GatewayAdapter\ensureUniqueOrderID(), GatewayAdapter\getFinalStatus(), GatewayAdapter\incrementSequenceNumber(), GatewayAdapter\session_addDonorData(), and tuneForRecurring().
Referenced by approvePayment(), cancel(), doPayment(), getOrderStatusFromProcessor(), and processDonorReturn().
IngenicoAdapter::doPayment | ( | ) |
Attempt the default transaction for the current DonationData.
Reimplemented from GlobalCollectAdapter.
Definition at line 173 of file ingenico.adapter.php.
References do_transaction(), GatewayAdapter\getData_Staged(), PaymentResult\newFailure(), PaymentResult\newIframe(), and PaymentResult\newRedirect().
IngenicoAdapter::getCommunicationType | ( | ) |
Data format for outgoing requests to the processor.
Must be one of 'xml', 'namevalue' (for POST), or 'redirect'. May depend on current transaction.
Reimplemented from GlobalCollectAdapter.
Definition at line 15 of file ingenico.adapter.php.
|
protected |
Reimplemented from GlobalCollectAdapter.
Definition at line 366 of file ingenico.adapter.php.
References GatewayAdapter\getData_Unstaged_Escaped().
|
protected |
Reimplemented from GlobalCollectAdapter.
Definition at line 357 of file ingenico.adapter.php.
References do_transaction().
IngenicoAdapter::getPaymentMethodsSupportingRecurringConversion | ( | ) |
Should return an array of payment methods that support setting up a recurring donation after a one-time donation via this gateway.
Implements RecurringConversion.
Definition at line 418 of file ingenico.adapter.php.
|
protected |
Definition at line 288 of file ingenico.adapter.php.
References GatewayAdapter\getData_Unstaged_Escaped().
Referenced by curl_transaction(), and parseResponseData().
IngenicoAdapter::getRequestProcessId | ( | $requestValues | ) |
Gateways which return true from isReturnProcessingRequired must override this with logic to get an ID from the request which will identify repeated attempts to process the same payment.
array | $requestValues |
Reimplemented from GatewayAdapter.
Definition at line 414 of file ingenico.adapter.php.
IngenicoAdapter::getResponseType | ( | ) |
Default response type to be the same as communication type.
Reimplemented from GatewayAdapter.
Definition at line 19 of file ingenico.adapter.php.
|
protected |
Get gateway status code from unstaged data.
Note: We currently add in substitute status codes for IN_PROGRESS and CANCELLED_BY_CONSUMER so that we can map these to a valid \SmashPig\PaymentData\FinalStatus. Ingenico does not return a status code for these two states, only the text description. This behaviour should updated when globalcollect is retired.
array | $txnData |
Reimplemented from GlobalCollectAdapter.
Definition at line 388 of file ingenico.adapter.php.
References GatewayAdapter\getData_Unstaged_Escaped().
IngenicoAdapter::parseResponseCommunicationStatus | ( | $response | ) |
Parse the response to get the status.
Not sure if this should return a bool, or something more... telling.
DOMDocument | $response | The response XML loaded into a DOMDocument |
Reimplemented from GlobalCollectAdapter.
Definition at line 293 of file ingenico.adapter.php.
IngenicoAdapter::parseResponseData | ( | $response | ) |
Harvest the data we need back from the gateway.
return a key/value array
When we set lookup error code ranges, we use GET_ORDERSTATUS as the key for search because they are only defined for that transaction type.
DOMDocument | $response | The response XML as a DOMDocument |
Reimplemented from GlobalCollectAdapter.
Definition at line 311 of file ingenico.adapter.php.
References getPaymentProvider().
IngenicoAdapter::parseResponseErrors | ( | $response | ) |
Parse the response to get the errors in a format we can log and otherwise deal with.
return a key/value array of codes (if they exist) and messages.
If the site has $wgDonationInterfaceDisplayDebug = true, then the real messages will be sent to the client. Messages will not be translated or obfuscated.
DOMDocument | $response | The response XML as a DOMDocument |
Reimplemented from GlobalCollectAdapter.
Definition at line 297 of file ingenico.adapter.php.
|
protected |
Definition at line 362 of file ingenico.adapter.php.
IngenicoAdapter::processDonorReturn | ( | $requestValues | ) |
Default implementation sets status to complete.
array | $requestValues | all GET and POST values from the request |
Reimplemented from GlobalCollectAdapter.
Definition at line 346 of file ingenico.adapter.php.
References do_transaction(), PaymentResult\fromResults(), and GatewayAdapter\getFinalStatus().
|
protected |
Setting some Ingenico-specific defaults.
array | $options | These get extracted in the parent. |
Reimplemented from GlobalCollectAdapter.
Definition at line 27 of file ingenico.adapter.php.
References GatewayAdapter\addRequestData(), and PROTO_CURRENT.
IngenicoAdapter::shouldRectifyOrphan | ( | ) |
Allows adapters to specify logic as to whether an orphan can be rectified.
Reimplemented from GatewayAdapter.
Definition at line 410 of file ingenico.adapter.php.
|
protected |
Stage: recurring Adds the recurring payment pieces to the structure of createHostedCheckout and getHostedPaymentStatus if the recurring field is populated.
Reimplemented from GlobalCollectAdapter.
Definition at line 256 of file ingenico.adapter.php.
References GatewayAdapter\getData_Unstaged_Escaped(), and GatewayAdapter\showMonthlyConvert().
Referenced by do_transaction().
const IngenicoAdapter::GATEWAY_NAME = 'Ingenico' |
Definition at line 11 of file ingenico.adapter.php.
const IngenicoAdapter::GLOBAL_PREFIX = 'wgIngenicoGateway' |
Definition at line 13 of file ingenico.adapter.php.
const IngenicoAdapter::IDENTIFIER = 'ingenico' |
Definition at line 12 of file ingenico.adapter.php.