Skip to content

Commit 8d87875

Browse files
committed
Docs tweaks and clarifications.
1 parent e74da15 commit 8d87875

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,24 +73,25 @@ This gives us a token and an iframe URL:
7373

7474
```php
7575
$response->getRedirectUrl();
76-
$response->getToken()
76+
$response->getToken();
7777
```
7878

79-
The payment form can be created as follows, assuming `/pay` as the next stage.
79+
The payment form can be created as follows, assuming `/pay` as the next enpoint in your flow.
8080
The iframe will contain the rendered credit card form.
8181
Add whatever additional customer or order details you want to the form.
8282
The iframe will be submitted with the form, but won't itself make any changes
8383
to your form; the credit card details go straight to the mPAY24 gateway.
8484
With this example, the submit bitton will remain disabled until the credit card
8585
details in the iframe have been completed.
8686

87-
The token possibly does not need to do through the form, but could be
88-
carried forward through the session instead.
87+
The token does not need to go through the form,
88+
but could be carried forward through the session instead.
8989

9090
```php
9191
<?php
9292

9393
<iframe src="<?php echo $response->getRedirectUrl(); ?>" frameBorder="0" width="500"></iframe>
94+
9495
<form action="/pay" method="POST">
9596
<input name="token" type="hidden" value="<?php echo $response->getToken(); ?>" />
9697
<button id="paybutton" name="type" value="TOKEN" type="submit" disabled="true">Pay with creditcard</button>
@@ -193,9 +194,9 @@ $response = $request->send();
193194
The `$response` will contain the normal Omnipay statuses and messages to define
194195
the result.
195196

196-
Note: your `complete` endpoint will be given the transaction result when redirected
197+
**Note:** your `complete` endpoint will be given the transaction result when redirected
197198
from the gateway.
198-
This result is **not** signed, and so can be easily faked by an end user.
199+
This result is *not* signed, and so can be easily manipulated by an end user.
199200
For this reason, this driver fetches the result from the gateway (a "pull" notification)
200201
to ensure no untrusted user data becomes a part of the process.
201202

@@ -208,7 +209,6 @@ merchant site.
208209

209210
### Purchase (redirect)
210211

211-
```php
212212
```php
213213
use Omnipay\Omnipay;
214214
use Omnipay\Common\CreditCard;
@@ -250,7 +250,15 @@ and `brand`. Example:
250250
Alternatively a range of payment methods can be supplied as a JSON string:
251251

252252
```php
253-
'paymentMethods' => '[{"paymentType":"CC","brand":"VISA"},{"paymentType":"CC","brand":"MASTERCARD"},{"paymentType":"PAYPAL","brand":"PAYPAL"}]',
253+
'paymentMethods' => '[{"paymentType":"CC","brand":"VISA"},{"paymentType":"CC","brand":"MASTERCARD"},{"paymentType":"PAYPAL","brand":"PAYPAL"}]',
254+
255+
// alternatively:
256+
257+
'paymentMethods' => json_encode([
258+
['paymentType' => 'CC', 'brand' => 'VISA'],
259+
['paymentType' => 'CC', 'brand' => 'MASTERCARD'],
260+
['paymentType' => 'PAYPAL', 'brand' => 'PAYPAL'],
261+
]),
254262
```
255263

256264
### Payment Page Complete Payment

0 commit comments

Comments
 (0)