thephpleague / omnipay-pin

Pin Payments driver for the Omnipay PHP payment processing library
MIT License
12 stars 14 forks source link

Added ability to setTestMode to true/false #1

Closed hailspuds closed 10 years ago

hailspuds commented 10 years ago

I was getting API auth failures with this class, and finally worked out it was because it was hitting up the live API. I had a key for the test API. I've added a function called "setTestMode", so the user can set the mode to true/false:

$gateway->setTestMode(true);

If it's true, it'll use the dev API. A false will use the live API.

Previously, the other way of doing it was going into the class and changing it manually. This change gives options.

amacneil commented 10 years ago

That already exists on the base gateway class.