============================================
| Module | Ratepay PHP SDK |
|---|---|
| Author | Aarne Welschlau |
| Version | 1.0.0 |
| Link | http://docs.ratepay.com |
| integration@ratepay.com |
composer installFind the basic usage of the different API calls and operations of the API library explained in the example files. The example.php explains the basic usage of the library.
To run the examples, insert your (received by Ratepay Merchant Onboarding Team) credentials into 'ratepay_credentials.php'.
Following table describes the basic (transaction-driven) operations in chronological order.
| # | File | Operation/+Subtype | Information | Description |
|---|---|---|---|---|
| 1 | example.php | Payment Init | Head | Shows the basic functionality of the Ratepay library |
| 2 | example.secciRequest.*.php | Secci Request | Head, shopping basket, secci, payment | Call to send consumer credit information to the customer |
| 3 | example.paymentRequest.*.php | Payment Request | Head, customer, shopping basket, payment | Call for authorization. Different examples for all payment methods |
| 4 | example.paymentChange.cancellation.php | Payment Change - Cancellation | Head, shopping basket | Informs Ratepay of a cancelled basket or article |
| 5 | example.confirmationDeliver.php | Confirmation Deliver | Head, shopping basket | Informs Ratepay of a shipped basket or article |
| 6 | example.paymentChange.return.php | Payment Change - Return | Head, shopping basket | Informs Ratepay of a returned basket or article |
| 7 | example.paymentChange.changeOrder.php | Payment Change - Change Order | Head, shopping basket | Informs Ratepay of a totally changed shopping basket |
| 8 | example.paymentChange.credit.php | Payment Change - Credit | Head, shopping basket | Informs Ratepay of a subsequent refund or fee |
| 9 | example.secciRequest.installmentEmail.php | SECCI Request - Installment Email | Head, shopping basket, payment, secci | generates SECCI information and attestation-token for paymentrequest and sends it via email for installment |
| 10 | example.secciRequest.invoiceEmail.php | SECCI Request - Invoice Email | Head, shopping basket, payment, secci | generates SECCI information and attestation-token for paymentrequest and sends it via email for invoice |
| 11 | example.secciRequest.invoicePdfPrint.php | SECCI Request - Invoice PDF | Head, shopping basket, payment, secci | generates SECCI information and attestation-token for paymentrequest and provides PDF for invoice |
Following table describes optional and transaction-independent operations.
| File | Operation/+Subtype | Description |
|---|---|---|
| example.PaymentInit.php | Payment Init | Optional call before Payment Request. Opens new transaction. Returns Ratepay transaction id. If Payment Request is called without transaction id Payment Init is called automatically by library |
| example.PaymentQuery.php | Payment Query | Identical to Payment Request. Returns all admitted Ratepay payment methods for this transaction |
| example.PaymentConfirm.php | Payment Confirm | Optional call which is called between Payment Request and Confirmation Deliver to confirm authorization and transmit additional order information |
| example.configurationRequest.php | Configuration Request | Returns the merchant installment configuration from Ratepay |
| example.calculationRequest.php | Calculation Request - calculation-by-time/calculation-by-rate | Calculates an installment plan. Subtype has to be calculation-by-rate which calculates by a rate defined by the customer or calculation-by-time which calculates by a duration chosen by the customer |
| example.profileRequest.php | Profile Request | Returns the merchant configuration from Ratepay, includes the installment configuration |