SlideShare a Scribd company logo
Driving Business with PayPal Extending Implementations To Increase Sales & Improve Customer Relationships
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Promotional Campaigns
Promotion Through Discounts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Technical Structure for Promotion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sample User Interfaces ,[object Object]
Administration of Promotion Codes ,[object Object]
Intelligence in IPN
IPN Business Use Cases ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Setting Up A Simple IPN Listener ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Testing your IPN Listener ,[object Object],[object Object],[object Object],[object Object],[object Object]
IPN Simulator ,[object Object],[object Object],[object Object]
Code :: Process IPN ,[object Object],[object Object],// read the post from PayPal system and add 'cmd’ $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header = "POST /cgi-bin/webscr HTTP/1.0
"; $header .= "Content-Type: application/x-www-form-urlencoded
” $header .= "Content-Length: " . strlen($req) . "

"; $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);
Code :: IPN Part 2 ,[object Object],[object Object],$txn_type = $_POST['txn_type']; $txn_id  = $_POST['txn_id']; $payment_status  = $_POST['payment_status']; …  <other posted variabels> … If (isset($_POST[‘custom’])) { $custom = $_POST['custom']; }
Code :: IPN :: Perform Checks and Process ,[object Object],if (!$fp) { // HTTP ERROR - log and notify } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, &quot;VERIFIED&quot;) == 0) { // check txn_type for case processing // check the payment_status is Completed // check txn_id has not been previously processed // check receiver_email is Primary PayPal email // check payment_amount/payment_currency are correct // perform action } else if (strcmp ($res, &quot;INVALID&quot;) == 0) { // log for manual investigation and notify } } fclose ($fp); }
IPN Transaction Types Source:  see Instant Payment Notification Guide pdf PayPal for complete list. Sample types for special processing cart recurring_payment web_accept recurring_payment_profile_created express_checkout subscr_signup mass_pay subscr_payment subscr_failed
Multiple IPN Listeners ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Test & Retrieve Variables // loop variables add body foreach($_POST as $name => $value) { $mail_Body .= &quot;$name : $value
&quot;; } ,[object Object],[object Object],[object Object]
Back Up Transaction Retrieval ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Recurring Payments
Leveraging Recurring Payments ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Good Practices ,[object Object],[object Object],[object Object]
Technical Notes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CreateRecurringPaymentsProfile NVP ,[object Object]
CreateRecurringPaymentsProfile SOAP ,[object Object],$response =  $caller->CreateRecurringPaymentsProfile($recurring_payments_request); switch($response->getAck()) { case 'Success': case 'SuccessWithWarning': // Extract the response details. $recurring_payments_response_details =  $response->getCreateRecurringPaymentsProfileResponseDetails(); $profileID = $recurring_payments_response_details->getProfileID(); exit('CreateRecurringPaymentsProfile Completed Successfully:' .  print_r($response, true)); default: exit('CreateRecurringPaymentsProfile failed: ' .  print_r($response, true)); }
CreateRecurringPaymentsProfile Return ,[object Object],[object Object],[object Object],[object Object]
Testing Recurring Payments ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],IPN Integration recurring_payment recurring_payment_profile_created recurring_payment_failed recurring_payment_skipped recurring_payment_suspended_due_to_max_failed_payment recurring_payment_profile_cancel
Sandbox IPN Recurring Payment Testing ,[object Object],[object Object],[object Object]
Testing Recurring Payments ,[object Object],[object Object]
IPN Message Variables ,[object Object],[object Object],[object Object]
Conclusion
Conclusion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Q&A Chuck Hudson www.aduci.com [email_address]
Thank you! Questions? To learn more, visit   www.ebay.com/devcon
From Payment to Life Cycle Payment Marketing Back-End  Integration Back-End  Integration

More Related Content

Similar to PayPal Dev Con 2009 Driving Business

Introducing safexpay smart NBFC solution
Introducing safexpay smart NBFC solutionIntroducing safexpay smart NBFC solution
Introducing safexpay smart NBFC solution
Neha Sahay
 
Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )
Yoshi Sakai
 
https://uii.io/ref/hmaadi
https://uii.io/ref/hmaadihttps://uii.io/ref/hmaadi
https://uii.io/ref/hmaadi
hmaadi96
 
java and javascript api dev guide
java and javascript api dev guidejava and javascript api dev guide
java and javascript api dev guide
Zenita Smythe
 
Monetizing your Applications with PayPal X Payments Platform
Monetizing your Applications withPayPal X Payments PlatformMonetizing your Applications withPayPal X Payments Platform
Monetizing your Applications with PayPal X Payments Platform
guest72b121
 
Monetizing your Applications with PayPal X Payments Platform
Monetizing your Applications withPayPal X Payments PlatformMonetizing your Applications withPayPal X Payments Platform
Monetizing your Applications with PayPal X Payments Platform
PayPalX Developer Network
 
Monetizing your apps with PayPal API:s
Monetizing your apps with PayPal API:sMonetizing your apps with PayPal API:s
Monetizing your apps with PayPal API:s
Disruptive Code
 
2012 SVCodeCamp: In App Payments with HTML5
2012 SVCodeCamp: In App Payments with HTML52012 SVCodeCamp: In App Payments with HTML5
2012 SVCodeCamp: In App Payments with HTML5
Jonathan LeBlanc
 
AAD B2C custom policies
AAD B2C custom policiesAAD B2C custom policies
AAD B2C custom policies
Rory Braybrook
 
Frappé Open Day Presentations - April 2016
Frappé Open Day Presentations - April 2016Frappé Open Day Presentations - April 2016
Frappé Open Day Presentations - April 2016
Neil Lasrado
 
HTML5 Gaming Payment Platforms
HTML5 Gaming Payment PlatformsHTML5 Gaming Payment Platforms
HTML5 Gaming Payment Platforms
Jonathan LeBlanc
 
PHP-04-Forms.ppt
PHP-04-Forms.pptPHP-04-Forms.ppt
PHP-04-Forms.ppt
NatureLifearabhi
 
4 Benefits of a Digitized and Automated AP System
4 Benefits of a Digitized and Automated AP System4 Benefits of a Digitized and Automated AP System
4 Benefits of a Digitized and Automated AP System
Flatirons Solutions®
 
Payment Gateway
Payment GatewayPayment Gateway
Payment Gateway
Nyros Technologies
 
Prévention et détection des mouvements latéraux
Prévention et détection des mouvements latérauxPrévention et détection des mouvements latéraux
Prévention et détection des mouvements latéraux
ColloqueRISQ
 
Claims Based Identity In Share Point 2010
Claims  Based  Identity In  Share Point 2010Claims  Based  Identity In  Share Point 2010
Claims Based Identity In Share Point 2010
Steve Sofian
 
PayPal Account Authentication Service
PayPal Account Authentication ServicePayPal Account Authentication Service
PayPal Account Authentication Service
Sherief Razzaque
 
Pay Book Guide User En
Pay Book Guide User EnPay Book Guide User En
Pay Book Guide User En
Yann GEFFROTIN
 
Winter 2003
Winter 2003 Winter 2003
Winter 2003
webhostingguy
 
Active Merchant
Active MerchantActive Merchant
Active Merchant
John Ward
 

Similar to PayPal Dev Con 2009 Driving Business (20)

Introducing safexpay smart NBFC solution
Introducing safexpay smart NBFC solutionIntroducing safexpay smart NBFC solution
Introducing safexpay smart NBFC solution
 
Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )
 
https://uii.io/ref/hmaadi
https://uii.io/ref/hmaadihttps://uii.io/ref/hmaadi
https://uii.io/ref/hmaadi
 
java and javascript api dev guide
java and javascript api dev guidejava and javascript api dev guide
java and javascript api dev guide
 
Monetizing your Applications with PayPal X Payments Platform
Monetizing your Applications withPayPal X Payments PlatformMonetizing your Applications withPayPal X Payments Platform
Monetizing your Applications with PayPal X Payments Platform
 
Monetizing your Applications with PayPal X Payments Platform
Monetizing your Applications withPayPal X Payments PlatformMonetizing your Applications withPayPal X Payments Platform
Monetizing your Applications with PayPal X Payments Platform
 
Monetizing your apps with PayPal API:s
Monetizing your apps with PayPal API:sMonetizing your apps with PayPal API:s
Monetizing your apps with PayPal API:s
 
2012 SVCodeCamp: In App Payments with HTML5
2012 SVCodeCamp: In App Payments with HTML52012 SVCodeCamp: In App Payments with HTML5
2012 SVCodeCamp: In App Payments with HTML5
 
AAD B2C custom policies
AAD B2C custom policiesAAD B2C custom policies
AAD B2C custom policies
 
Frappé Open Day Presentations - April 2016
Frappé Open Day Presentations - April 2016Frappé Open Day Presentations - April 2016
Frappé Open Day Presentations - April 2016
 
HTML5 Gaming Payment Platforms
HTML5 Gaming Payment PlatformsHTML5 Gaming Payment Platforms
HTML5 Gaming Payment Platforms
 
PHP-04-Forms.ppt
PHP-04-Forms.pptPHP-04-Forms.ppt
PHP-04-Forms.ppt
 
4 Benefits of a Digitized and Automated AP System
4 Benefits of a Digitized and Automated AP System4 Benefits of a Digitized and Automated AP System
4 Benefits of a Digitized and Automated AP System
 
Payment Gateway
Payment GatewayPayment Gateway
Payment Gateway
 
Prévention et détection des mouvements latéraux
Prévention et détection des mouvements latérauxPrévention et détection des mouvements latéraux
Prévention et détection des mouvements latéraux
 
Claims Based Identity In Share Point 2010
Claims  Based  Identity In  Share Point 2010Claims  Based  Identity In  Share Point 2010
Claims Based Identity In Share Point 2010
 
PayPal Account Authentication Service
PayPal Account Authentication ServicePayPal Account Authentication Service
PayPal Account Authentication Service
 
Pay Book Guide User En
Pay Book Guide User EnPay Book Guide User En
Pay Book Guide User En
 
Winter 2003
Winter 2003 Winter 2003
Winter 2003
 
Active Merchant
Active MerchantActive Merchant
Active Merchant
 

Recently uploaded

Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
Data Hops
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
maazsz111
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 

Recently uploaded (20)

Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 

PayPal Dev Con 2009 Driving Business

Editor's Notes

  1. Best Practices for Integrating Payments Pro Session Title: Driving Business with PayPal Session Abstract: Many SMB customers are looking for a higher level of integration out of their ecommerce system to drive stronger end customer relationships. Some of the more common additional pieces of functionality above standard checkout processing includes marketing campaigns connected into their product purchasing (special promos, discount coupons, etc.), tie-ins of transactional information into their online administration, and the acceptance of online invoice payments tied into their financial system. In this session we will look at taking PayPal integration to the next level through technologies such as Payments Pro, Instant Payment Notification, and Recurring Payment. In the process not only will we look at lessons learned and recommendations based on the experience of developing several of these end solutions for small and medium businesses. We will use live site case studies but also walk through the design and code of the following examples: Implementing promo/discount codes in the checkout process through Payments Pro Keeping transaction records in back end systems using Instant Payment Notification (IPN) Leveraging recurring billing for long term customer relationships and overall customer retention These examples will be shown in a hypothetical invoice payment system that we will walk through during the talk. We will look at the customer flow, business benefits, and implementation best practices of each of the above pieces functionalities into a site. This session should provide multiple ideas for incorporating advanced features into your own site or customer web projects, along with some best practices to guide you to a successful integration. Note: Most examples, for ease of demonstration in the session will be provided in PHP and mySql, however the functionality and design could be leveraged across a variety programming languages and the underlying PayPal technologies remain the same.
  2. Promotion, discount, coupon codes Security of server side, prevent the user from manipulating a cookie or client side JS or the order in paypal Watch out for client side code validation as it exposes the codes available to users Store codes in database for easy maintenance and tracking Also need to be aware if more than one coupon code can be used per order
  3. Recalculation of order needs to happen if items updated or code changed
  4. https://cms.paypal.com/cms_content/US/en_US/files/developer/IPNGuide.pdf
  5. SSL is not required for IPN because no banking or credit card information is transmitted in the posting of information from paypal to your IPN catch page Remember to put the IPN temporarily on hold if processing IPN catch page under maintenance Typically use either “custom” or “invoice” fields for matching up database records, only real difference is length 255 versus 127 and custom is not presented to the customer
  6. The address for opening the connection and doing the post back varies on two conditionals: ssl encryption and production or sandbox selection. Here are the possible values. Sandbox and http $fp = fsockopen (&apos;www.sandbox.paypal.com&apos;, 80, $errno, $errstr, 30); Sandbox and ssl $fp = fsockopen (’ssl://www.sandbox.paypal.com&apos;, 443, $errno, $errstr, 30); Production and http $fp = fsockopen (&apos;www.paypal.com&apos;, 80, $errno, $errstr, 30); Production and ssl $fp = fsockopen (&apos;ssl://www.paypal.com&apos;, 443, $errno, $errstr, 30); For cURL examples see the following link in the PayPal developer forums: http://developer.paypal-portal.com/pdn/board/message?board.id=ipn&amp;thread.id=12752&amp;view=by_date_ascending&amp;page=1
  7. See the Instant Payment Notification Guide pdf (Document Number: 10087.en_US-200903) for the complete set of information.
  8. Based on the transaction type different processing rules can be created to handle the information passed via IPN based on the business processes.
  9. Website Payments Standard button notify_url HTML form variable NVP API operation NOTIFYURL field of the DoDirectPayment, DoExpressCheckoutPayment, or DoReferenceTransaction request SOAP API operation NotifyURL field of the DoDirectPayment, DoExpressCheckoutPayment, or DoReferenceTransaction request
  10. We use this to troubleshoot both production issues and validate the set of variables returned by a specific transaction type.
  11. This method is used as a back up for the IPN notifications when the business must have all transactions integrated for accounting, packing and shipping processes and the like. Set the STARTDATE and ENDDATE values for the window of time for the TransactionSearch call. If a transaction is found that an IPN has not been received for then call GetTransactionDetails for retrieving the same type of information as what would have been found in the IPN. Make sure to use a flag of last successful poll time as the new start time so that do not miss a window based on communication issues. PayPal source code examples can be found at https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&amp;content_ID=developer/library_code.
  12. DoDirectPayment call and authorize $1, then void it if successful
  13. Showing direct method here. Just as easily this can be put into an Express Checkout flow using a token based validation.
  14. The $recurring_payments_request variable holds the parameters for the new profile. See the SOAP example for a breakdown of building the parameters into the profile.
  15. Profile ID can then be used to query the profile and perform other API calls on the recurring payments so store this with the client information. Error messages follow standard style including error code number and messages. Here is another sample: TIMESTAMP: 2009-05-11T15:15:23Z CORRELATIONID: 66130dd934ffb ACK: Failure VERSION: 51.0 BUILD: 904483 L_ERRORCODE0: 10527 L_SHORTMESSAGE0: Invalid Data L_LONGMESSAGE0: This transaction cannot be processed. Please enter a valid credit card number and type. L_SEVERITYCODE0: Error
  16. Recurring payments instant payment notifications and email Event IPN Buyer Email Profile successfully created Yes Yes Profile creation failed Yes Yes Profile canceled from paypal.com interface Yes Yes Profile status changed using API No Yes Profile update using API No Yes Initial payment either succeeded or failed Yes Yes Payment either succeeded or failed (during either trial period or regular payment period) Yes Yes Outstanding payment either succeeded or failed Yes Yes Maximum number of failed payments reached Yes No NOTE: API transactions such as ManangeRecurringPaymentsProfileStatus do not trigger IPN notification because the success or failure of the call is immediately provided by the API response.
  17. Even with performing recurring payments in the sandbox you will still not be able to create all the actions that trigger IPNs. Some will only be available in production.
  18. It is also beneficial to add a catch all in your IPN processing page so that if an unhandled IPN txn_type is caught that you can then be notified either by logging of the variables or email of the variables.
  19. Code Samples Sample Code https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&amp;content_ID=developer/library_code IPN https://www.paypal.com/us/cgi-bin/?cmd=p/xcl/rec/ipn-code-outside CreateRecurringPaymentsProfile API https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&amp;content_ID=developer/e_howto_api_nvp_r_CreateRecurringPayments Documentation IPNGuide.pdf https://cms.paypal.com/cms_content/US/en_US/files/developer/IPNGuide.pdf