@@ -16,6 +16,7 @@ Table of Contents
1616 * [ Payment Page] ( #payment-page )
1717 * [ Purchase (redirect)] ( #purchase-redirect )
1818 * [ Payment Page Complete Payment] ( #payment-page-complete-payment )
19+ * [ Payment Page Recurring Profiles] ( #payment-page-recurring-profiles )
1920 * [ Notification Handler] ( #notification-handler )
2021
2122# mPAY24 Driver for Omnipay v3
@@ -111,6 +112,12 @@ but could be carried forward through the session instead.
111112
112113The ` /pay ` endpoint handles the actual payment.
113114
115+ The above form does not redirect the user to a payment page.
116+ Instead, it sends the card details to the gateway, with the token as a key.
117+ So in the next step, the gateway will already have the card details and the
118+ merchant site will just use the pre-generated token to reference them when
119+ completing the payment.
120+
114121### Payment Using Token
115122
116123``` php
@@ -265,6 +272,54 @@ Alternatively a range of payment methods can be supplied as a JSON string:
265272
266273The transaction is completed in exactly the same way as for the seamless payments.
267274
275+ ### Payment Page Recurring Profiles
276+
277+ The gateway supports two types of profile: a single recurring payment profile for a customer,
278+ and up to 20 interactive profiles for each customer.
279+ The * Payment Page* API will support only ONE of these profile types at a time.
280+ This driver presently support ONLY recurrent payment profiles for * Payment Page* .
281+
282+ To create or update a customer's recurring payment profile, when making a purchase,
283+ set the ` createCard ` flag and provide a ` customerId ` :
284+
285+ 'createCard' => true,
286+ 'customerId' => 'cust-12345',
287+
288+ On completing the payment, you can check if the customer recurring profile was created
289+ or updated by checking the profile status:
290+
291+ $profileWasCreatedOrUpdates = $completeResult->isProfileChanged();
292+
293+ If this returns true, then it means the payment details for the current transaction
294+ have been saved against the customer ID.
295+ Use the customer ID as though it were a card reference when making a backend payment.
296+
297+ A customer ID can be used to make a recurring payment (an offline payment) liek this:
298+
299+ ``` php
300+ $gateway = Omnipay::create('Mpay24_Backend');
301+
302+ // Set the usual merchant ID and test mode flags.
303+
304+ $request = $gateway->purchase([
305+ 'amount' => '9.99',
306+ 'currency' => 'EUR',
307+ 'transactionId' => 'new-transaction-id',
308+ 'description' => 'Recurring Payment Description',
309+ 'card' => [
310+ 'name' => 'Customer Name',
311+ ],
312+ 'notifyUrl' => 'https://omnipay.acadweb.co.uk/mpay24/notify.php?foo=bar&fee=fah', // mandatory
313+ 'language' => 'de',
314+ // Either
315+ 'customerId' => 'cust-12345',
316+ // or
317+ 'cardReference' => 'cust-12345',
318+ ]);
319+ ```
320+
321+ This will return the details of the successful payment, or error details if not successful.
322+
268323## Notification Handler
269324
270325The notification handler will accept notification server requests,
0 commit comments