- PHP - Coding Standard
- PHP - File Uploading
- PHP - Sending Emails
- PHP - Sessions
- PHP - Cookies
- PHP - Functions
- PHP - Files & I/O
- PHP - File Inclusion
- PHP - GET & POST
- PHP - Web Concepts
- PHP - Strings
- PHP - Arrays
- PHP - Loop Types
- PHP - Decision Making
- PHP - Operator Types
- PHP - Constants
- PHP - Variable Types
- PHP - Syntax Overview
- PHP - Environment Setup
- PHP - Introduction
- PHP - Home
Advanced PHP
- PHP - For PERL Developers
- PHP - For C Developers
- PHP - Object Oriented
- PHP & XML
- PHP & AJAX
- PHP & MySQL
- PHP - Date & Time
- PHP - Bugs Debugging
- PHP - Error Handling
- PHP - Regular Expression
- PHP - Predefined Variables
PHP Form Examples
PHP login Examples
PHP AJAX Examples
PHP XML Example
- PHP - DOM Parser Example
- PHP - SAX Parser Example
- PHP - Simple XML GET
- PHP - Simple XML
- PHP - XML Introduction
PHP Frame Works
PHP Design Patterns
PHP Function Reference
PHP Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
PHP - PayPal Integration
PayPal is a payment processing system, We can integrate PayPal with websites by using with php.
PayPal integration file system
PayPal integration file system included 4 files as shown below.
constants.php − This file has included API user name, password and signature.
CallerService.php − This file has included PayPal Services, which is used to call PayPal services.
confirmation.php − This file has included a form with minimum fields required to make payment process and it will return payment success or failure.
PayPal_entry.php − This page has used to send the user the data to PayPal. It acts as an adapter between PayPal and user form.
The user has to download a PayPal SDK file from
and exact a zip file. The zip file contains four php files, We don t need to change any file except constants.phpThe constants.php file contains code as shown below −
<?php define( API_USERNAME , YOUR USER NAME HERE ); define( API_PASSWORD , YOUR PASSWORD HERE ); define( API_SIGNATURE , YOUR API SIGNATURE HERE ); define( API_ENDPOINT , https://api-3t.paypal.com/nvp ); define( USE_PROXY ,FALSE); define( PROXY_HOST , 127.0.0.1 ); define( PROXY_PORT , 808 ); define( PAYPAL_URL , https://www.PayPal.com/webscr&cmd=_express-checkout&token= ); define( VERSION , 53.0 ); ?>
The user will declare User Name, password and signature in above syntax which are placed in constants.php. This is an experimental example so the last amount will be added to sandbox s account.
Advertisements