View Full Version : CakePHP
round
01-30-2013, 12:37 PM
I am new to CakePHP. I do need to integrate First Data Payment Gateway in my project.
I have downloaded the plugin from here : https://github.com/chronon/ggapi
I dont know how to use this plugin, can anyone help me to use this plugin. ?
Thanks in advance for any help.
Your question is unclear.
Please provide more information, and be as specific as possible.
What do you want to accomplish? What have you already tried? What problems did you encounter?
Please be sure that you have included all relevant code and/or a link to the page in question.
You might also consider making a reduced test case (http://css-tricks.com/reduced-test-cases/) to help troubleshoot and illustrate your problem.
round
01-31-2013, 04:37 AM
Thanks for reply traq,
I am building a Shopping Cart using CakePHP.
I have already integrated Paypal functionality.
Now i have to add "First Data Payment Gateway" in the same system, so that the customer can have the choice of "Paypal" or "First Data Payment Gateway" for Payment.
So for that i google some data and downloaded the Plugin for "First Data Payment Gateway" from this url : https://github.com/chronon/ggapi
I am new to cakePHP and i don't know how to use this plugin.
Till now i just downloaded this plugin and put it into my Plugin folder. But i don't know how to proceed now.
Can you help me to how to use it with the system ?
Have you looked at the demo code provided with the plugin?
// attempt the charge (array $data, boolean $testing)
$response = $this->Ggapi->ggProcess($data, true);
// update the order table with the response
if ($response) {
if ($response['r_approved'] == 'APPROVED') {
// merge the response data with the order data
$this->data['Order'] = array_merge($this->data['Order'], $response);
} else {
// card was DECLINED
$error = explode(':', $response['r_error']);
$this->Session->setFlash(
'Your credit card was declined. The message was: '.$error[1],
'modal',
array('class' => 'modal error')
);
$this->redirect(array('controller' => 'orders', 'action' => 'checkout'));
}
} else {
// no response from the gateway
$this->Session->setFlash(
'There was a problem connecting to our payment gateway, please try again.',
'modal',
array('class' => 'modal error')
);
$this->redirect(array('controller' => 'orders', 'action' => 'checkout'));
}it looks like this assumes you've already collected the credit card number and other info from the user. I don't know much about CakePHP, so I couldn't say exactly how to integrate it. This isn't a "plugin" in the sense that you can just "plug it in" and expect it to work - you have to write your code to use it.
I will say that, if you're going to deal with CC info at all, you need to find someone who really knows what they're doing so you can be sure it's secure.
I'm not being dismissive or condescending - I'm as sincere as I can be.
Seriously: if you have to ask, about any of it, then you shouldn't be doing it yourself.
Money is a big responsibility, and a big risk. All of my clients get a strong recommendation for using PayPal instead.
round
01-31-2013, 05:41 AM
Ok No worries traq.
I will try to code by my self.
Anyways Thanks for your time & guidance.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.