Pesapal.com

Forum

Welcome, Guest
Username
Password:
 

How return amount paid and post to database
(1 viewing) (1) Guest
Welcome to the Pesapal integration forum!

This forum discusses everything about Pesapal integration on your web site. Having any problems? This is the right place to post a question and we are sure you will get an answer
  • Page:
  • 1

TOPIC: How return amount paid and post to database

How return amount paid and post to database 11 years, 5 months ago #873

  • kempanju
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I am developing a system using php and i have integrated pesapal. The problem is on how to compare amount paid with what was supposed to be paid.. and other ploble is on how to return amount of paid by users. What i see is pesapal retun only the pesapalTrackingId and pesapal_merchant_reference

Re: How return amount paid and post to database 11 years, 5 months ago #874

It's not necessary for you to check the amount paid; pesapal does this for you. Simply store the amount payable by the buyer in the database and use the IPN to query for the status of the transaction. If the buyer has paid the required amount then you will receive a repsonse from the IPN as follows (from the API):

"A return value of INVALID indicates that the transaction with the Reference you provided could not be found. If you receive a return value of PENDING, you will have to query PesaPal again, until you receive COMPLETED or FAILED as the response."

If the buyer did not pay the full amount, then they will get a refund of the amount they paid after which they can repeat the payment process.
If the buyer pays more than they should, then the excess amount will be deposited into their pesapal account.

Re: How return amount paid and post to database 11 years ago #1133

  • edward
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hi John,
I am currently integrating Pesapal in an application that I've just completed developing. What happens when the user has paid more and they don't have a pesapal account. Where does the excess go?

Regards,
Edward

Re: How return amount paid and post to database 11 years ago #1134

Hi Edward,
What I noticed happens is that; if the user used their email to check out, an account is automatically created for them and all they need to do is check their email for a link to pesapal where excess funds are held. They can use funds to pay for any other services that accept pesapal.
The following user(s) said Thank You: lazro, edward
  • Page:
  • 1