Pay using braintree



Hare is step how to pay using Brain tree in code igniter




First Download  library from 

https://github.com/AeonDave/CodeIgniter-Braintree-Lib


Now load Library in your constructor


$CI->load->library("braintree_lib");



*********  create customer in brain tree


$result = Braintree_Customer::create([
                             'id'=>time(),
                            'firstName' => $post['vName'],
                            'lastName' => '',
                            'company' => '',
                            'email' => $post['vEmailId'],
                            'phone' => '',
                            'fax' => '',
                            'website' => ''
                        ]);
                       
                       
                        ($result->success)?$iBtreeCustomerId=$result->customer->id : $iBtreeCustomerId='';



***************  

Comments

Popular posts from this blog

Connect multiple database and call in code igniter

Call CI controler functiona from View using ajax