thephpleague / omnipay-common

Core components for the Omnipay PHP payment processing library
MIT License
329 stars 242 forks source link

Is there any standard way to choose gateway's environment consistently? #235

Closed devnix closed 3 years ago

devnix commented 3 years ago

I'm trying to understand how to send the purchase to the sandbox environment in PayPal Express and Redsys gateways, but I'm not finding a specific way to specify that I'll want to go to a sandbox environment (I will need to implement a couple more of gateways).

I've found a setEnvironment method in some gateways, and others have a custom named parameter, and I'm unsure about how to proceed.

barryvdh commented 3 years ago

testMode is the default parameter. See https://omnipay.thephpleague.com/gateways/configuring/

devnix commented 3 years ago

So it's not gateway dependent? (Sorry if I'm making dumb questions :smile:)

barryvdh commented 3 years ago

It depends on the gateway to implement it correctly. But if a sandbox is possible, it should use that parameter.

devnix commented 3 years ago

Ok, thank you!