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

Add command for paying tuition #14

Merged
merged 16 commits into from
Jan 8, 2015
Merged

Add command for paying tuition #14

merged 16 commits into from
Jan 8, 2015

Conversation

clehner
Copy link
Member

@clehner clehner commented Jan 6, 2015

⚠️ 💸

This adds a pay command for making tuition payments. Currently it works for me with my payment profile that is one word, but doesn't work if the payment profile is more than one word. I am still looking into this. Be careful with testing that you are sure you want to make a payment (or otherwise don't let execution get to quikpay_payment_process_path

I also added an abstract pick_item function for use with picking payment profiles, which could be used to replace parts of get_course and get_assignment as they implement mostly the same logic.

@clehner
Copy link
Member Author

clehner commented Jan 6, 2015

Anyone have comments or want to test this?

@jthurst3
Copy link
Contributor

jthurst3 commented Jan 6, 2015

Quikpay wasn't working for me with bb bill, but I will test out this new functionality and get back to you hopefully tomorrow.

@clehner
Copy link
Member Author

clehner commented Jan 6, 2015

The quikpay issues (#5) might be fixed in 8cd4abc. Let me know if those work for you.

@jeremywrnr
Copy link
Contributor

payments works perfectly for me, and bill works, but with some parsing errors:
image

@clehner
Copy link
Member Author

clehner commented Jan 7, 2015

@jeremywrnr Parsing issue produced. Moving it to #5.

@clehner clehner mentioned this pull request Jan 7, 2015
@jthurst3
Copy link
Contributor

jthurst3 commented Jan 7, 2015

For me, bb pay shows no output if given with no arguments. Also, the call to pick_item fails, so bb pay exits early. I've traced the problem to methods=$(parse_payment_profiles < "$temp") not returning anything.

@clehner
Copy link
Member Author

clehner commented Jan 7, 2015

@jthurst3 does it work for you before 98b88b6? If so, the issue is with the regexes matching carriage returns. Otherwise it is probably with the parsing in parse_payment_profiles, or the request to $quikpay_payment_path.

@jthurst3
Copy link
Contributor

jthurst3 commented Jan 7, 2015

@clehner: It doesn't work in 28f2fad or 98b88b6.

@clehner
Copy link
Member Author

clehner commented Jan 7, 2015

If it's an issue in parse_payment_profiles then it might be that some payment profiles are in a different format. I've changed it to produce output even if a certain replacement doesn't occur. Does that let it produce any output of payment profiles for you?

@jthurst3
Copy link
Contributor

jthurst3 commented Jan 7, 2015

It does! But it's not very helpful. Here is the output for me:

1)                       <select name="method" class="inputBox" id="paymentMethod"><option value="">Select One...</option><option value="_ECHECK_METHOD">&nbsp;&nbsp;eCheck&nbsp;&nbsp;</option><option value="_CREDIT_CARD_METHOD">&nbsp;&nbsp;Credit Card&nbsp;&nbsp;</option><option value="_WIRE_TRANSFER_METHOD">International Wire</option></select>
2)                       <select name="method" class="inputBox" id="paymentMethod"><option value="_ECHECK_METHOD">&nbsp;&nbsp;eCheck&nbsp;&nbsp;</option><option value="_CREDIT_CARD_METHOD">&nbsp;&nbsp;Credit Card&nbsp;&nbsp;</option><option value="_WIRE_TRANSFER_METHOD">International Wire</option></select>
3)                       <select name="method" class="inputBox" id="paymentMethod"><option value="_CREDIT_CARD_METHOD">&nbsp;&nbsp;Credit Card&nbsp;&nbsp;</option><option value="_WIRE_TRANSFER_METHOD">International Wire</option></select>
4)                       <select name="method" class="inputBox" id="paymentMethod"><option value="_WIRE_TRANSFER_METHOD">International Wire</option></select>

@clehner
Copy link
Member Author

clehner commented Jan 7, 2015

Looks like you don't have any saved payment profiles, from which the script would let you choose. Anyway, it is a bug that it produces the output you got. It should show an error message instead. (And should probably mention this in the readme). Allowing using new payment methods (i.e. interactively enter bank account or credit card info) would be additional functionality (Edit: #16)

@jthurst3
Copy link
Contributor

jthurst3 commented Jan 8, 2015

Great, looks merge-able to me! Anyone else have any comments? (@jeremywrnr)

@jeremywrnr
Copy link
Contributor

I also don't have any stored payment profiles so I can't test the full functionality, but bb pay recognizes this and gives me a informative error. Looks good!

jthurst3 added a commit that referenced this pull request Jan 8, 2015
@jthurst3 jthurst3 merged commit 7dc5271 into master Jan 8, 2015
@jthurst3 jthurst3 deleted the pay branch January 8, 2015 18:35
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

Successfully merging this pull request may close these issues.

3 participants