Skip to content

Commit 110080c

Browse files
committed
Issue #112 Additional docs on how Sage Pay Form works.
1 parent 1fa282a commit 110080c

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,12 @@ since the result will be safely saved in the database.
594594

595595
Sage Pay Form requires neither a server-to-server back-channel nor
596596
IP-based security.
597+
It does not require pre-registration of a transaction, so is ideal for
598+
a speculative "pay now" button on a page for instant purchases of a
599+
product or service.
600+
Unlike `Direct` and `Server`, it does not support saved card references
601+
or tokens.
602+
597603
The payment details are encrypted on the server before being sent to
598604
the gateway from the user's browser.
599605
The result is returned to the merchant site also through a client-side
@@ -622,7 +628,7 @@ $gateway = OmniPay::create('SagePay\Form')->initialize([
622628

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

625-
Note that this gateway will assume all inout data (names, addresses etc.)
631+
Note that this gateway will assume all input data (names, addresses etc.)
626632
are UTF-8 encoded.
627633
It will then recode the data to ISO8859-1 before encrypting it for the gateway,
628634
as the gateway strictly accepts ISO8859-1 only, regardless of what encoding is

src/Message/Form/AuthorizeRequest.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,6 @@ public function getCryptData()
9393
{
9494
$data = $this->getBaseAuthorizeData();
9595

96-
// CHECKME: are tokens supported?
97-
98-
if ($this->getToken() || $this->getCardReference()) {
99-
// If using a token, then set that data.
100-
$data = $this->getTokenData($data);
101-
}
102-
10396
// Some [optional] parameters specific to Sage Pay Form..
10497

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

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

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

0 commit comments

Comments
 (0)