Retrieve detailed Paypal donation transaction information in HTML format with the donation button functionality integrated

I'm currently in the process of building a web application for a non-profit organization, which includes a Paypal Donation feature. I am using HTML5, CSS3, and jQuery to develop this application. I have successfully implemented the Donation button from this source.

All necessary parameters have been set for the Donation Button, directing users to the Paypal Transaction Page where transactions are functioning properly.

My main challenge is retrieving the current transaction details within my application so that I can store these details in a database for record-keeping. The required transaction details include:

  1. Donor Name
  2. Donation Amount
  3. Donor Email Address
  4. Transaction Date/Time

Is there a method to obtain these details once the donation transaction is completed in my application?

Thank you in advance

Answer №1

If you want to seamlessly retrieve transaction data from Paypal to your application, make sure to include the notify_url parameter when setting up your Paypal button.

  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
         <input type="hidden" name="cmd" value="_donations">
         <input type="hidden" id ="businessAccount" name="business" value=“<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7424150d04151834071b19115a1715">[email protected]</a>”>
         <input type="hidden" name="lc" value="US">
         <input type="hidden" name="button_subtype" value="services">
         <input type="hidden" name="cn" value="Add Some Words about this Donation:">
         <input type="hidden" name="currency_code" value="USD">
         <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHosted">
         <input type="hidden" name="on0" value="Donate">
         <input id="amount" type="hidden" name="amount" value=“50” >
         <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
         <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
         <input id="notify_url" type="hidden" name="notify_url" value=“YOUR URL WHERE YOU WANT TO GET THAT TRANSACTION DETAIL”>
         <input id="return" type="hidden" name="return" value=“AFTER SUCCESSFUL TRANSACTION URL FROM YOUR SITE“>
         <input id="cancel_return" type="hidden" name="cancel_return" value=“CANCEL TRANSACTION URL FROM YOUR SITE“>


  </form>

To handle these notifications efficiently, utilize Instant Payment Notification (IPN). Create an IPN listener page on your server and specify the URL of this page in the value of the notify_url input tag.

<input id="notify_url" type="hidden" name="notify_url" value=“YOUR URL WHERE YOU WANT TO GET THAT TRANSACTION DETAIL”>

To access a sample of IPN listener code, check it out here. After a transaction is completed, the Listener will receive detailed information about the transaction.

Note: You can also include custom data with the transaction by setting their values in additional hidden input tags.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue encountered while rendering tables with Jquery-dataTables

Encountering an issue with jquery datatables when fetching data from a URL using ajax calls. Implementing the codeigniter framework, I utilize the datatables library to create datatable objects by invoking the echo $this->datatables->generate() metho ...

The navigation bar in responsive view on Bootstrap 4 causes the content below it to shift

Recently I have been exploring bootstrap-4 and encountered an issue while creating a nav-bar. The problem is that in responsive view, when toggling the nav-bar it simply pushes the content below it. Is there any way to address this issue within (bootstra ...

Align the text vertically within a list item

<ul style="text-align: center;"> <li style="margin: 0; padding-bottom: 23px; font-size: 32px; vertical-align: middle;"> <div style="font-family: 'Arial','sans-serif'; color: black; font-size: 17px;">[%code1%]</ ...

Use CSS height:auto for every element except SVG

Is there a way to scale all images on my site while excluding SVG files using native CSS? .myClass img { height: auto; } I have tried the following, but it only targets SVG files: .myClass img[src$=".svg"] {height: auto;} Using != doesn't seem ...

Positioning broadcasted videos on a web page using the OpenTok API

Currently, I am utilizing opentok to connect to the broadcast service and obtaining the flash player object at the bottom of my page. I am seeking guidance on how to position it within a specific div container. The following code snippet demonstrates how ...

Picture placed outside div within infobubble

I'm currently working with Google Maps to display an InfoWindow using the InfoBubble library. The issue I'm encountering is that when I try to show an image outside of a div using CSS properties, only half of the image displays within the div. B ...

Align the reposition button with the pagination in the datatables

I am looking to adjust the placement of my buttons. The buttons in question are for comparison, saving layout, and printing. I would like them to be inline with the pagination, as I am using datatables here. <table id="sparepart_id" cellspacing="0" ...

Issue encountered while transferring data using Ajax

I am a novice in the realm of ajax and currently immersed in a project that demands passing data from an ajax function to a php page for the purpose of dynamically generating and displaying modals. Although I am successful in creating the modal, I suspect ...

Ajax request unable to load Image Slider

I'm currently implementing an Image Slider from this source For the site structure, I've set up an index.html file to display all the pages, allowing navigation by changing the content within <div id="isi">. Here's a snippet of the in ...

Slider with Dual Images: A Visual Comparison

I'm currently working on a webpage that features before and after images using a slider based on mouse movement to display both pictures. I am trying to incorporate multiple sliders on the same page but have been facing difficulties in getting them to ...

Struggling with IE7 compatibility issues regarding tables inside a div? Seeking a reliable resource to gain insights and strategies for effectively resolving IE7 problems

I am currently in the process of revamping this website: but I am facing a challenge with repeating a gradient within a div (cnews). The problem arises when the gradient is repeated on IE7, as it distorts the color. It appears as though the blue in the im ...

Incorporate zoom feature into the jQuery polaroid gallery

Currently, I am utilizing a jQuery and CSS3 photo gallery found on this website. My goal is to allow the images to enlarge when clicked, however, the method provided by the author isn't very clear to me, as I'm not an expert in jQuery. I attempt ...

Unable to specifically identify or focus on this offspring

I am attempting to target the class has-translucent-status-bar nested within another class called platform-ios To achieve this, I have used the following code: .platform-ios > .has-translucent-status-bar Unfortunately, this approach has not been succ ...

Invisible and Unrestricted automatic playback

Why is auto play muted in both Firefox and Chrome? How can we code it so that browsers don't block it? Here's the code I'm using: <audio id="audio1" src="https://notificationsounds.com/storage/sounds/file-sounds-1217-relax ...

Issue with starting tubular jquery video on Safari 7 (mac)

I'm currently utilizing the tubular plugin () to generate a subtle HTML video background. Everything is functioning smoothly in Chrome, however, when attempting to run it on Safari 7 for Mac, the video fails to start. After some investigation, I&apos ...

How can I prevent the repetition of a background image causing empty spaces?

Encountered an issue with a repeating background image. In instances where the content is relatively short, shorter than the height of the screen, the background image continues to repeat for the remaining space. Please refer to the accompanying screensh ...

Unable to display Bootstrap 5 modal

I am currently in the process of constructing a basic webpage that includes a navigation bar and a table. The table rows are being dynamically generated through a simple JavaScript script that fetches data asynchronously from a database. I opted to utilize ...

Verify Radio Buttons in AngularJS

I thought validating a selection from a radio group would be simple, but I'm struggling to find the right solution. In my form, I need to ensure that at least one option is selected from the radio buttons. Using the 'required' attribute on e ...

Tips for adjusting the width of a table

add your image description hereImagine a scenario where there is a table featuring two columns. <table> <tr><td>Email</td> <td></td></tr> <tr><td>Full name</td> <td></td></tr> ...

How to automatically close a Bootstrap 3 modal when the browser's back button is pressed

Is there a way to create a modal page that closes when either the browser back button or the close button inside the modal is clicked, using bootstrap 3? I found a script that accomplishes this, but it has a flaw. For example, if I start on google.com, nav ...