How do I get card details later using card reference in unoapp-dev/omnipay-moneris
$card = $this->gateway->createCard(['card' => $card])->send();
$ref = $card->getCardReference();
Something like
$cardDetials = $this->gateway->getCardDetails(['cardReference' => $ref]);
Or
$cardDetials = $this->gateway->fetchProfile(['cardReference' => $ref]);
I tried to get card details after creating card using cardReference, couldn't find any documentations.
expect to get ```expiry_year, expiry_month```
2
Answers
First, I use this version in composer.json:
and I try these codes, and I do not use laravel framework:
after run, you can use method "$response->isSuccessful()", if true, means success. but in var "$gateway", it does not have method "gateway->getCardDetails" or "gateway->fetchProfile".
if you want to get the reponse detail, can use "$response->getData()".
wish to help u!
On the last answer, this dependency "unoapp-dev/omnipay-moneris": "2.2.0", it does not implement the methods "$this->gateway->getCardDetails" and "$this->gateway->fetchProfile", but u can implement by yourself.
Referred by Moneris developers portal. It has many API.
https://developer.moneris.com/Documentation/NA/E-Commerce%20Solutions/API/Vault?lang=php
The Vault Get Expiring API can get the expired card, u can try.
and the core class MpgClasses can find in github:
https://github.com/Moneris/eCommerce-Unified-API-PHP/blob/master/mpgClasses.php#L1185
To refer the api doc and MpgClasses class, u can write your own many implementations and then place them in dependency "unoapp-dev/omnipay-moneris": "2.2.0".