I need to know if this is possible with PHP, or possible at all...
Let's say there's a shopping cart done in PHP. payment processing is via PayPal.
Customer John adds 2 items to the value of $70 into the cart. Now, John pays only 20 bucks. Then Peter and Jim volunteer to pay the balance. Peter pays $30 one week later using his MasterCard. Jim pays the remaining $20 after another 10 weeks. This means that the PHP code needs to keep track of the PayPal payments to the SAME transaction.
The key question is: DOES PAYPAL OR ANY OTHER GATEWAY ALLOW SUCH MULTIPLE PAYMENTS TO THE SAME BILL BY DIFFERENT PEOPLE OVER A PERIOD OF TIME?
Even a link to the PayPal system's documentation that shows this would be good for an answer. But it MUST be able to sa开发者_C百科tisfy the rules above.
Thanks!
You would have to modify an existing shopping card, or create your own to support this. Allowing different people to pay for the same item is easy enough with SQL, just be sure to keep track of the payment_status updates for each payment.
Shopping carts are usually amount locked, meaning they can't enter their own amount to pay for the object. If you remove the &amount=XXX
from the payment url (assuming paypal), then when they reach paypal, it will prompt them for an amount to be sent.
On your end, you will use sql to keep track of each payment, and when the sum of all payments reaches the total, send the item to all payers.
精彩评论