Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#395 closed bug (fixed)

Donations via paypal - integration with BW

Reported by: jeanyves Owned by: micha
Priority: major Milestone: 0.2 - community
Component: BW General Keywords: Donations
Cc: lupochen steinwinde lemon-head

Description

I have prepared a mock-up which allow to make safe donations from BW, using paypal to secure transaction (people can pay via a paypal account or a VISA / MASTERCARD) and calling back BW to display the result of donation (and recording them for them to be manage).

The Call back to BW is configured inside paypal, this is the difficult thing and they are several checking done in BW to be sure that this is a real confirmed transaction provided by paypal

The url is [www.bewelcome.org/bw/donations.php]. I have committed the code in trunk if someone wants to work on it ....

The todo :

  • this need a dedicated beautiful PT page for displaying the, let say, last 10 donations (with amount, date, name of the place the donator was but not name/email ...)
  • this PT page should provide a form for donating (with a call back to the current mock-up)
  • I think it is more wise not to try to proceed the callback via PT platform tool for now, let first get some experience with the current system, after, we will change it

==Additional information to help for designing of the PT page ==

===To retrieve the data of the last donations use ===

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="treasurer@bevolunteer.org">

<select  name="amount">
<option value="10.00">5 €</option>
<option value="25.00" selected>25 €</option>
<option value="50.00">50 €</option>
<option value="100.00">50 €</option>
<option value="200.00">50 €</option>
</select>
<input type="hidden" name="item_name" value="BeVolunteer donation">
<input type="hidden" name="page_style" value="Primary">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://www.bewelcome.org/bw/donations.php?action=done">
<input type="hidden" name="cancel_return" value="http://www.bewelcome.org/bw/donations.php?action=cancel">
<input type="hidden" name="cn" value="comment">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="bn" value="PP-DonationsBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="donate safely via paypal">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

the gif can be changed the return and cancel values must not be changed (for now)

the € stands for

===to retrieve the data about last donations made in the BW database===

it is as easy as : select * from donations order by created desc limit 10

===testing=== It works on production only, because of the call back, if you use it on

More testing are needed of course, but for now, for a logged in member donating via pay pal, it works very well

Change History (16)

comment:1 Changed 11 years ago by jeanyves

I forget to add :

The name and email of the donator are stored . They are the one return by paypal. They should have some encryption in the future.

comment:2 Changed 11 years ago by jeanyves

One problem : it seems that a donations by VISA thru the paypal interface don't return parameters in the same way as a classical paypal, consequence the money is receive, no problem , but the transaction is not stored n the BW donations table

One additional feature to think when moving it to PT platform : provide a way for someone with treasurer right to insert a donation which was not done via paypal (cash, Iban transfer). Provide a way to update data (in case we are to rfund someone for example)

comment:3 Changed 11 years ago by jeanyves

  • freq_reported set to 1
  • show_on_bw set to 0

Current Status : the donations page works, but :

  • when you donate using a visa card you have to click on the RETURN TO ASS BEVOLUNTTER button to be returned to bewelcome, and then you donations data (not you Card number !) are properly recorded in the donations table
  • when you donate via paypal, either you click on the button to return to bewelcome, either you wait for the automatic return to occur (an dthe process workks perfectly)
  • if you don't return to the BeWelcome page via the normal paypal expected process, the donations is perfectly processed, except that the BeVolunteer Treasurer will have to manually fill the donations record after taking manually the data from the paypal administration page (it's a pain)

To summarize the bw donations pages works well, allows for VISA or PAYPAL donations (I have tested the both http://www.bewelcome.org/bw/donations.php). It is needed to move it to ROX, I think a first step is to show the donations results, second step will be to fully manage the donations process.

May be they are way to automatically retrieve data from paypal which will save treasurer energy for the manual cases.

comment:4 Changed 11 years ago by philipp

  • Milestone changed from 0.1.4 - improving userinterface for members and volunteers and start work on big 0.2 tasks to 0.1.5 - short - xxx

comment:5 Changed 11 years ago by micha

  • Owner set to micha
  • Status changed from new to assigned

I'm working on the donation-page based on Rox. First version moved to alpha in rev. 4306

comment:6 Changed 11 years ago by lemon-head

My changes on the Rox application killed the donations page..

I make a new one, in build/donate.

I use the old application architecture of MyTB, so we can move the thing online before we move the new architecture.

comment:7 Changed 11 years ago by lemon-head

[4503] - repaired.

comment:8 Changed 11 years ago by jeanyves

I fixed the default language setting in paypal in layout/donations.php

to do it I added in the donation form for the button the following code :


<input type="hidden" name="lc" value="<?php 
 if (isset($_SESSION["lang"]) ) {
	switch ($_SESSION["lang"]){
	 case 'fr' :
		echo "FR" ;
		break ;
	 case 'de' :
		echo "DE" ;
		break ;
	 case 'it' :
		echo "IT" ;
		break ;
	 case 'esp' :
		echo "ES" ;
		break ;
		 default :
	echo "US" ;
		break ;
	} 
 }
 else {
   echo "US" ;
 }
 ?>"> 

not all the languages are here but this is sufficient for test and feedback experience. This is probably to add in the new/future donation page

comment:9 Changed 11 years ago by micha

just moved the rox-based version from test to alpha. Please test. I'm not sure wether the settings there are sufficient for testing... rev. [4514]

comment:10 Changed 11 years ago by micha

this ticket is connected to #378 donation bar

comment:11 Changed 11 years ago by lemon-head

Please, use $words->getBuffered() in combination with $words->flushBuffer() for the labels of the donation submenu!!! Otherwise, translators will have a hard time to translate it.

We should also think about how we can combine the translation pages with the help/about navigation structure.

  • all in one submenu?
  • 3rd level navigation?

If we make a third level navigation: How can it look like? A sub-submenu of tabs? Or toplevel tabs -> submenu tabs -> sidebar navi, as it is in "about" nowadays? I think the sidebar navi in about is not really optimal, or is it? Some user testing would be a good idea, and then a new design vision! Who wants to do the testing?

comment:12 Changed 11 years ago by micha

  • follow_up changed from review code to test on alpha
  • show_on_bw changed from 0 to 1

I will implement $words->getBuffered, lemonhead. But did someone test the donation itself? The donation-page is already on production for testing (!): https://www.bewelcome.org/donate

If the donation works and I add the getBuffered-tags, we can close this ticket.

comment:13 Changed 11 years ago by micha

  • follow_up changed from test on alpha to none
  • Resolution set to fixed
  • Status changed from assigned to closed

moved to production in r4600

comment:14 Changed 11 years ago by feuerdaemon

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Type changed from improve feature to bug

After I translated the Donation Page. I tested the donation page. It works only with the preselected 25€ or an userdefined value. If you change via the dropdownlist Paypal says "The link you have used to enter the PayPal? system contains an incorrectly formatted item amount." If you then "Return to Merchant". BeWelcome shows a lot of Notice and a Warning.

Notice: Undefined index: tx in /home/bwrox/www.bewelcome.org/build/donate/donate.model.php on line 98
Notice: Undefined index: amt in /home/bwrox/www.bewelcome.org/build/donate/donate.model.php on line 99
Notice: Undefined index: cc in /home/bwrox/www.bewelcome.org/build/donate/donate.model.php on line 100
Warning: Cannot modify header information - headers already sent by (output started at /home/bwrox/www.bewelcome.org/build/donate/donate.model.php:98) in /home/bwrox/www.bewelcome.org/build/default/default.view.php on line 13

comment:15 Changed 11 years ago by philipp

  • Resolution set to fixed
  • Status changed from reopened to closed

I opened a new ticket for the last report #534 - closing this one

comment:16 Changed 11 years ago by philipp

  • Milestone changed from 0.1.5 - short - xxx to 0.2 - community

Milestone 0.1.5 - short - xxx deleted

Note: See TracTickets for help on using tickets.