Skip to content

Commit

Permalink
Removed API-specific default values from gateway class (temporary).
Browse files Browse the repository at this point in the history
All the default values in the gateway class *must* be supported with
setters and getters in all request messages that the gateway supports;
the core tests insist on this. Most of those parameters are irrelevant
for the complete*, the acceptNotification and the other backend functions,
so make no sense to implemement. Those messages will probably have to be
moved to a "Backend" gateway class so the default parameters match the
supported message parameters.
  • Loading branch information
judgej committed May 31, 2017
1 parent 8b296f4 commit 9af5d3c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,16 @@ $request = $gateway->purchase([
...normal purchase data (TODO: examples)...
...additional gateway-specific feature data (TODO: examples)...
//
// These three URLs are mandatory to the gateway, but will be defaulted to the
// These three URLs are required to the gateway, but will be defaulted to the
// returnUrl where they are not set.
'returnUrl' => 'https://example.com/complete',
//'cancelUrl' => 'https://example.com/complete?status=cancel', // User cancelled
//'failureUrl' => 'https://example.com/complete?status=failure', // Failed to authorise
//
// These two URLs are required.
'notifyUrl' => 'https://example.com/acceptNotification',
'serviceUrl' => 'https://example.com/terms_of_service_and_contact',
//
'confirmMail' => '[email protected]',
]);
$response = $request->send();
Expand Down
4 changes: 4 additions & 0 deletions src/CheckoutPageGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,23 @@ public function 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

0 comments on commit 9af5d3c

Please sign in to comment.