Skip to content

Commit

Permalink
Set default values for all gateway parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
judgej committed May 31, 2017
1 parent e0e6f67 commit 8b296f4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ $gateway->setSecret('B8AKTPWBRMNBV455FG6M2DANE99WU2');
$gateway->setFailureUrl('https://example.com/complete?status=failure');
$gateway->setServiceUrl('https://example.com/terms_of_service_and_contact');

// Most other gateway and API-specific parameters (i.e. those not recognised by
// the Omnipay core) can be set at the gateway or the message level.

$request = $gateway->purchase([
...normal purchase data (TODO: examples)...
...additional gateway-specific feature data (TODO: examples)...
Expand Down
16 changes: 15 additions & 1 deletion src/CheckoutPageGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,22 @@ public function getDefaultParameters()
{
$params = parent::getDefaultParameters();

//
// Parameters for Checkout Page and Checkout Seamless APIs.
// TODO: move these to an AbstractCheckoutGateway class once
// Seamless is supported.
$params['noScriptInfoUrl'] = '';
$params['windowName'] = '';
$params['duplicateRequestCheck'] = true;
$params['transactionIdentifier'] = '';
$params['financialInstitution'] = '';
$params['cssUrl'] = '';

// Parameters specific to Checkout Page API.
$params['displayText'] = '';
$params['imageUrl'] = '';
$params['backgroundColor'] = '';
$params['maxRetries'] = null;
$params['paymenttypeSortOrder'] = '';

return $params;
}
Expand Down
1 change: 0 additions & 1 deletion src/Traits/CheckoutParametersTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,4 @@ public function getCssUrl()
{
return $this->getParameter('cssUrl');
}

}

0 comments on commit 8b296f4

Please sign in to comment.