I created an e-commerce site in CodeIgniter, also making Paypal seamless integration.
There did not seem to be any object oriented suuuuuper-pretty shells when I did my hunt, but I noticed some good attempts.
My decision turned out to be a bit bland. I downloaded the PHP API from here:
https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_PHP_NVP_Samples.zip
I saved the file CallerService.phpas I application/helpers/paypal_helper.phpadded it in application/config/autoload.phpto paste it into the application.
Now it CallerService.phprequires constants.php, so you need to either copy and paste it, or include the file constants.phpin the directory of your assistants. I just copied and pasted. Then be sure to configure all the constants for your account.
:
$nvp_query_string = '&PAYMENTACTION=Sale'
. '&AMT='.urlencode($order->total)
. '&CREDITCARDTYPE='.urlencode($this->input->post('credit_card_type'))
. '&ACCT='.urlencode($this->input->post('acct'))
. '&EXPDATE='.urlencode(str_pad($this->input->post('exp_date_month'), 2, '0', STR_PAD_LEFT).'20'.$this->input->post('exp_date_year'))
. '&CVV2='.urlencode($this->input->post('cvv2_number'))
. '&FIRSTNAME='.urlencode($first_name)
. '&LASTNAME='.urlencode($last_name)
. '&STREET='.urlencode($order->billing_address_1)
. '&CITY='.urlencode($order->billing_city)
. '&STATE='.urlencode($order->billing_state)
. '&ZIP='.urlencode($order->billing_zip)
. '&COUNTRYCODE=US&CURRENCYCODE=USD';
$response = hash_call('doDirectPayment', $nvp_query_string);
if (strpos(strtoupper($response['ACK']), 'SUCCESS') !== false) {
}
else {
}
, .
, SSL. 30 . , . SSL , CC , ( Wi-Fi) . , , CC, https://, http://.