Skip to content

Commit

Permalink
Issue thephpleague#112 Additional docs on how Sage Pay Form works.
Browse files Browse the repository at this point in the history
  • Loading branch information
judgej committed Oct 14, 2018
1 parent 1fa282a commit 110080c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,12 @@ since the result will be safely saved in the database.

Sage Pay Form requires neither a server-to-server back-channel nor
IP-based security.
It does not require pre-registration of a transaction, so is ideal for
a speculative "pay now" button on a page for instant purchases of a
product or service.
Unlike `Direct` and `Server`, it does not support saved card references
or tokens.

The payment details are encrypted on the server before being sent to
the gateway from the user's browser.
The result is returned to the merchant site also through a client-side
Expand Down Expand Up @@ -622,7 +628,7 @@ $gateway = OmniPay::create('SagePay\Form')->initialize([

The `encryptionKey` is generated in "My Sage Pay" when logged in as the administrator.

Note that this gateway will assume all inout data (names, addresses etc.)
Note that this gateway will assume all input data (names, addresses etc.)
are UTF-8 encoded.
It will then recode the data to ISO8859-1 before encrypting it for the gateway,
as the gateway strictly accepts ISO8859-1 only, regardless of what encoding is
Expand Down
9 changes: 1 addition & 8 deletions src/Message/Form/AuthorizeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,6 @@ public function getCryptData()
{
$data = $this->getBaseAuthorizeData();

// CHECKME: are tokens supported?
if ($this->getToken() || $this->getCardReference()) {
// If using a token, then set that data.
$data = $this->getTokenData($data);
}

// Some [optional] parameters specific to Sage Pay Form..

if ($this->getCustomerName() !== null) {
Expand Down Expand Up @@ -144,7 +137,7 @@ public function getCryptData()
$data = array_intersect_key($data, $this->validFields);

// Throw exception if any mandatory fields are missing.
// We need to catch it here before sending the user to an
// We need to catch it here before sending the user to a
// generic (and useless) error on the gateway site.

foreach ($this->validFields as $fieldName => $mandatoryFlag) {
Expand Down

0 comments on commit 110080c

Please sign in to comment.