I'm trying to get Omnipay to work with Pin Payments.
This is what I have so far:
require 'vendor/autoload.php';
use Omnipay\Common\GatewayFactory;
$gateway = GatewayFactory::create('Pin');
$gateway->setSecretKey('KEY');
$gateway->setTestMode(true);
$response=$gateway->purchase(array(
'amount' => 1.00,
'description' => 'test charge',
'email' => '[email protected]',
'currency' => 'USD',
'ip_address' => '1.53.227.0',
'card' => array(
'number' => '4111111111111111',
'expiry_month' => '06',
'expiry_year' => '2016',
'cvc' => '333',
'name' => 'le minh luan',
'address_line1' => '184A Nguyen Thanh Vinh St Dist 12',
'address_city' => 'Ho Chi Minh City',
'address_postcode' => '70000',
'address_state' => 'Ho Chi Minh City',
'address_country' => 'Vietnam'
)
))->send();
if ($response->isSuccessful()) {
// payment was successful: update database
print_r($response);
} elseif ($response->isRedirect()) {
// redirect to offsite payment gateway
$response->redirect();
} else {
// payment failed: display message to customer
echo $response->getMessage();
}
?>
And I got the error "The requested resource could not be found." Any help appreciated :)