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

MEB-90: Add support for donating in EUR using PayPal #264

Merged
merged 12 commits into from Apr 24, 2017
Merged

MEB-90: Add support for donating in EUR using PayPal #264

merged 12 commits into from Apr 24, 2017

Conversation

gentlecat
Copy link
Contributor

No description provided.

@gentlecat gentlecat self-assigned this Apr 18, 2017
@gentlecat gentlecat changed the title [WIP] MEB-90: Add support for donating in EUR using PayPal MEB-90: Add support for donating in EUR using PayPal Apr 19, 2017
@gentlecat gentlecat requested a review from mayhem April 19, 2017 18:02
Copy link
Member

@mayhem mayhem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also tried to create the tables locally after copying over custom_config.py (leaving default currencies in place) but I get this error:

sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) syntax error at or near "NULL"
LINE 1: CREATE TYPE payment_currency AS ENUM (NULL)

when running create tables. Do I need to configure anything else?

return

# Checking if payment was sent to the right account depending on the currency
if form['mc_currency'].upper() in account_ids:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would this ever happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When money is sent to an account for another currency. If that's too redundant, I can remove the check.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we should try and avoid this happening in the first place -- is there reason to think that this might still occur?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a bug in the frontend.

@@ -219,7 +219,7 @@ <h1 class="page-title">{{ _('Make a Payment') }}</h1>

{# Info about variables can be found at https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/ #}

$('<input>').attr({type: 'hidden', name: 'business', value: '{{ config.PAYPAL_PRIMARY_EMAIL }}'}).appendTo(form);
$('<input>').attr({type: 'hidden', name: 'business', value: '{{ config['PAYPAL_ACCOUNT_IDS']['USD'] }}'}).appendTo(form);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this hard coded to USD?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't changed "payments" yet. Just donations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I saw the [WIP] on the title of the PR go away, so I thought it was done...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I split it into two.

Copy link
Member

@mayhem mayhem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, with the given clarifications, this looks ok. We'll wait to deploy until the latter half is done, yes?

@gentlecat
Copy link
Contributor Author

We'll wait to deploy until the latter half is done, yes?

Not necessarily. This should work just fine.

I'm currently fixing database creation issues that you pointed out before.

@gentlecat gentlecat merged commit 4fa036e into metabrainz:master Apr 24, 2017
@gentlecat gentlecat deleted the eur branch April 24, 2017 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants