Hello I'm using omnipay github lib with migs integration in my project. The sample code isn't seems to be working. Can anyone help me with this?
require_once 'vendor/autoload.php';
use \Omnipay\Omnipay as omnipay;
$gateway = Omnipay::create('Migs_ThreeParty');
$gateway->setMerchantId('foo');
$gateway->setMerchantAccessCode('foo');
$gateway->setSecureHash('foo');
try {
$response = $gateway->purchase(array('amount' => '0.00', 'currency' => 'AED', 'returnURL' => 'www.google.com.pk'))->send();
if ($response->isRedirect()) {
// redirect to offsite payment gateway
$response->redirect();
//$url = $response->getRedirectUrl();
//$data = $response->getRedirectData();
} else {
// payment failed: display message to customer
echo $response->getMessage();
}
} catch (\Exception $e) {
// internal error, log exception and display a generic message to the customer
exit('Sorry, there was an error processing your payment. Please try again later.');
}
Does "$gateway->setSecureHash" == "$SECURE_SECRET" as shown in the example link http://integrate-payment-gateway.blogspot.in/2012/01/migs-payment-gateway-integration-php.html
The above code is asking for the redirectUrl and the transactionId. Where to specify it?