Download the PHP package luniumall/moneris-api without Composer
On this page you can find all versions of the php package luniumall/moneris-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download luniumall/moneris-api
More information about luniumall/moneris-api
Files in luniumall/moneris-api
Package moneris-api
Short Description An easier way to consume the (truly awful) Moneris eSELECTplus API.
License MIT
Informations about the package moneris-api
Moneris API
![Latest Version on Packagist][ico-version] [![Build Status][ico-travis]][link-travis] ![Total Downloads][ico-downloads]
Requirements
PHP 5.6 and later
Composer
To get started, install the package via the Composer package manager:
Instantiation
Creating a new Moneris instance is quite easy and straightforward.
Note: Please note that the Moneris store id and API token are always required to be passed to the Moneris constructor or static create method.
Run Unit Test
Run all test cases
Run a specific test case
Transactions
To make a purchase, preauth a card, void a transaction, etc. is very straightforward once you have your Gateway instantiated (see above).
Purchase
Purchase (Retrieve Transaction)
Status Check is a connection object value that allows merchants to verify whether a previously sent transaction was processed successfully. To submit a Status Check request, resend the original transaction with all the same parameter values, but set the status check value to either true or false. Once set to “true”, the gateway will check the status of a transaction that has an order_id that matches the one passed. If the transaction is found, the gateway will respond with the specifics of that transaction. If the transaction is not found, the gateway will respond with a not found message. Once it is set to “false”, the transaction will process as a new transaction. Things to consider: The Status Check request should only be used once and immediately (within 2 minutes) after the last transaction that had failed. Do not resend the Status Check request if it has timed out. Additional investigation is required.
Pre-Authorization
Capture (Pre-Authorization Completion)
Void (Purchase Correction)
3D-Secure 2.2
Steps
- Make
Card Lookup
request, get ThreeDSMethodURL and ThreeDSMethodData -
The threeDSMethodData must be sent via HTTP POST to the threeDSMethodURL in a hidden iFrame. Get JS script can be used in iframe.
-
Handling The Challenge Flow - If get a TransStatus = “C” in your threeDSAuthentication Response, then a form must be built and POSTed to the URL provided. The “action” is retrieved from the ChallengeURL and the “creq” field is retrieved from the ChallengeData.
- Process Cavv Purchase
TransStatus Codes
VALUE | DESCRIPTION | COMMENTS |
---|---|---|
Y | Authenticated | Cardholder has been fully authenticated |
A | Authentication Attempt | A proof of authentication attempt was generated |
C | Challenge Required | Cardholder requires a challenge to complete authentication |
U | Not Authenticated | Authentication could not be performed due to technical or other issue |
N | Not Authenticated | Not authenticated |
R | Not Authenticated | Not authenticated because the Issuer is rejecting authentication and requesting that authoriZation not be attempted |
Card Lookup
MPI 3DS Authentication
CAVV Lookup
CAVV Purchase
Refund
Card Verification
CVD and AVS
To take advantage of the Card Verification Digits and/or Address Verification Service provided by Moneris, you need to tell Moneris that upon instantiation (as shown above).
When making a CVD secured purchase, pre-authorization or card verification, you need to pass the following parameter to the Gateway method you are utilizing.
When making an AVS secured purchase, pre-authorization or card verification, you need to pass the following parameters to the Gateway method you are utilizing.
Note: When making an AVS or CVD secured transaction, even if AVS or CVD fails, you will still have to void the transaction (DAMN MONERIS!). There are two easy ways around this.
Verify the card first. Using this method, there is one additional caveat (let me repeat it again...DAMN MONERIS!). Your verification transaction and purchase transaction must have different order_id
parameters. One such solution could be to prepend an specific prefix to the front of verification order ids.
Void the transaction.
Credential On File
The credential on file is part of the new Visa requirements to pass the CVD/CVV2 data for transactions.
Vault
The Moneris Vault allows you create and maintain credit card profiles on the Moneris servers instead of your own. To access the Vault, you will need to have your instantiated Gateway (see above).
Add a Card
Note: The expiry passed into the credit card is in the format of YYMM as that is how Moneris accepts it.
Update a Card
In order to maintain your credit card profiles, Moneris will send back a unique key for the profile that will allow you to keep track in your own database. You can retrieve the key once you have received your Receipt (see more below)
Delete a Card
Attaching a Customer
In order to sync your customer information with the credit cards stored in the Vault, we can attach a basic Customer
object to the CreditCard
.
Add a Card
Update a Card and Customer
Tokenize a Previous Transaction
Used to create a credit card profile based on a previous transaction.
Peek Into The Vault
If you have the need to look up the masked credit card number you can peek into the Vault.
Retrieve Expiring Cards
This transaction can be performed no more then 2 times on any given calendar day as per the Moneris API.
Transactions
Credit cards stored in the Moneris Vault have a slightly different flow for purchasing and pre-authorization. Any of the other transactions work exactly the same as shown above.
Vault Purchase
Note: The Vault is used for the transaction here instead of the base Gateway object.
Vault Pre-Authorization
Responses and Receipts
The Response
and Receipt
objects allow you to understand how everything went with your API call. After a transaction returns from being processed the Response
will get validated and return all the relevant information for you.
Response
The information available to you on the Response
object is as follows:
Errors
Any errors that might occur during your transaction will be returned in the following format for you. It is returned in this format to allow you to handle any translation logic in your own app by utilizing the unique title
and field
keys in each error.
Status
The status will return a status code matching the appropriate error returned. See below for an example of the possible statuses returned.
Success
The successful property simply lets you know if your transaction has been processed successfully.
Receipt
The Receipt
object is your record of any information relevant to your transaction you have submitted. To retrieve your receipt once you have a response see the following.
Depending on that type of transaction, you will have different items on your Receipt
that you have available to read.
For a full list of possible readable receipt items, see below.
Run Unit Test
Run all test
Run a test
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- All Contributors
License
Moneris API is open-sourced software licensed under the MIT license.