Welcome Guest, Not a member yet? Register   Sign In
QuickBooks Merchant Services Library
#1

[eluser]Unknown[/eluser]
This class allows the credit card process with Quickbooks Merchant Services http://quickbooks.com/. It was built using the documentation written in http://developer.intuit.com.

QuickBooks configuration file example
Configuration File Name : quickbook_ms.php
<?
$config = array(
'apps' => array(
'test_app' => array( // TEST MODE
'qbmsurl' => 'https://merchantaccount.ptc.quickbooks.com/j/AppGateway',
'Type' => 'desktop',
'ApplicationLogin' => 'app.url.com',
'ConnectionTicket' => 'XXX-XXX-XXXXXXXXXXXXXXX',
'AppID' => '0000000000',
'AppVer' => '1.0',
'Language' => 'English'
),
'production_app' => array( // PRODUCTION MODE
'qbmsurl' => 'https://merchantaccount.quickbooks.com/j/AppGateway',
'Type' => 'desktop',
'ApplicationLogin' => 'app.url.com',
'ConnectionTicket' => 'XXX-XXX-XXXXXXXXXXXXXXX',
'AppID' => '0000000000',
'AppVer' => '1.0',
'Language' => 'English'
)

)
);
?>

Implementation examples:

$this->load->library('quickbook_ms'); // Load the library

// Init the application as test mode, if you need to change to another
// application defined in your configuration file,
// you just have to change it in the parameter on the method bellow,
// for example to set as production mode you just have to call "production_app" application.
$this->quickbook_ms->init('test_app');




// $_POST = array( 'TransRequestID' => '', // Needs to be a sec number that needs to be incremented any time the transaction fail in the checkout method showed bellow
// 'CreditCardNumber' => '',
// 'ExpirationMonth' => '',
// 'ExpirationYear' => '',
// 'Amount' => '',
// 'NameOnCard' => '',
// 'CreditCardAddress' => '',
// 'CreditCardPostalCode' => ''
// );
if ($this->quickbook_ms->checkout($_POST[transaction])){
// Successful transaction.
redirect('/thanks_for_your_payment_page');
}else{
// Errors in the transaction
echo $this->quickbook_ms->response_message;
}




Theme © iAndrew 2016 - Forum software by © MyBB