Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple items for paypal checkout #59

Closed
jinxee opened this issue Apr 15, 2013 · 7 comments
Closed

multiple items for paypal checkout #59

jinxee opened this issue Apr 15, 2013 · 7 comments
Assignees

Comments

@jinxee
Copy link

jinxee commented Apr 15, 2013

Is there anyway I can add in multiple items in add_fields?

pay_pal.add_fields({
"business": "paypalemail@somedomain.com",
"item_name": "Test Item",
"invoice": "UID",
"notify_url": "http://example.com/paypal-ipn-handler/",
"return_url": "http://example.com/paypal/",
"cancel_return": "http://example.com/paypal/unsuccessful/",
"amount": 100})

I want to be able to show the price breakdown based on the items an user wants to purchase on the paypal screen.

@tuxcanfly
Copy link
Member

I'm assuming you're talking about Offsite Paypal integration

http://merchant.agiliq.com/offsite/paypal/

In this case, paypal expects the POST contents to have a amount field containing the total amount that you are charging.

So, I don't think you can use add_fields to display the breakdown.

I think you should keep the breakdown in your templates, just use the total amount as the amount in add_fields

@jinxee
Copy link
Author

jinxee commented Apr 15, 2013

Absolutely. On my templates, I have my items' prices breakdown displayed and only using the 'amount' attribute for my grand total.
But once the user clicks on "Buy It", it proceeds to paypal's site and on the left column, it only displays what's specified in the dict that was passed to add_fields.

I don't think it's a good idea to just show an amount w/o the breakdown of items. I'd prefer the user to be able to have another final look on the multiple items they are going to purchase.

@tuxcanfly
Copy link
Member

OK, found this link which says it's possible

http://stackoverflow.com/questions/3308898/paying-for-multiple-items-at-once-via-paypal

Looks like you just need to use amount_1, amount_2 etc. Should be possible using the existing add_fields.

Would that work for you?

@jinxee
Copy link
Author

jinxee commented Apr 15, 2013

Thanks for the link. I just tried passing it using add_fields, no luck.
I also tried manually specifying the form fields and added in the extra fields. Does not work either.

@tuxcanfly
Copy link
Member

@jinxee any luck? This is a good feature to have, so I'll plan it for the next milestone.

@ghost ghost assigned tuxcanfly May 14, 2013
@tuxcanfly
Copy link
Member

This is an issue with django-paypal - it's payment form has amount, item_name but no amount_1, item_name_1 etc..

https://github.com/dcramer/django-paypal/blob/master/paypal/standard/forms.py#L57

Should be do-able by overriding the form add adding a formset for multiple items.

@tuxcanfly
Copy link
Member

@jinxee Now implemented! Thanks for bringing this to our notice :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants