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

[2.3.1] PayPal Checkout not populating Total Fees #1245

Closed
jimpdx opened this issue Oct 21, 2021 · 6 comments
Closed

[2.3.1] PayPal Checkout not populating Total Fees #1245

jimpdx opened this issue Oct 21, 2021 · 6 comments
Assignees
Labels
bug confirmed Bug report confirmed in test environment in latest master commit Fix is in latest commit to master. Not in release. v2.3.2

Comments

@jimpdx
Copy link
Contributor

jimpdx commented Oct 21, 2021

Version: 2.3.1
Self Hosted Installation URL: https://fallclassic.oregonbrewcrew.org

Description of Issue:
I noticed today (when paying for my own entries in 2.3.1 that clicking "Pay with PayPal" was not pre-populating the "Total Fees" variable that I think you are still sending in your code (ref: https://github.com/geoffhumphrey/brewcompetitiononlineentry/blob/master/sections/pay.sec.php#L178)

image

We have been using PayPal in BCOEM without any issues for years. Unless I am crazy, this is the first time the payment form did not pre-populate the amount and asked me to enter it? Seems like it would allow participants to easily pay the wrong amount?

This could be a change on the PayPal side of things, as I know the code has not been updated in some time. I didn't see any other open issues relating to this so I thought I might bring it up? I am happy to research further if you have any PP resources/dev guides I can look over.

@jimpdx
Copy link
Contributor Author

jimpdx commented Oct 21, 2021

Actually I checked the source and the hidden variable is not being populated by the code internally:

 <input type="hidden" name="action" value="add_form" />
 <input type="hidden" name="cmd" value="_xclick">
 <input type="hidden" name="business" value="treasurer@oregonbrewcrew.org">
 <input type="hidden" name="item_name" value="Thompson, Jim - 2021 Oregon Brew Crew Fall Classic - PayPal Payment">
 <input type="hidden" name="amount" value="">
 <input type="hidden" name="currency_code" value="USD">
 <input type="hidden" name="button_subtype" value="services">
 <input type="hidden" name="no_note" value="0">
 <input type="hidden" name="cn" value="Add special instructions">
 <input type="hidden" name="no_shipping" value="1">
 <input type="hidden" name="rm" value="1">
 <input type="hidden" name="custom" value="1\|134">
 <input type="hidden" name="return" value="https://fallclassic.oregonbrewcrew.org/index.php?section=pay&msg=10">
 <input type="hidden" name="cancel_return" value="https://fallclassic.oregonbrewcrew.org/index.php?section=pay&msg=11">
 <input type="hidden" name="bn" value="PP-BuyNowBF:btn_paynowCC_LG.gif:NonHosted">
 <button type="button" name="btn" id="submitBtn" data-toggle="modal" data-target="#confirm-submit" class="btn btn-primary" /><span class="fa fa-paypal"></span> Pay with PayPal</button>

@jimpdx
Copy link
Contributor Author

jimpdx commented Oct 21, 2021

So just messing around with the code locally, this change seems to have fixed the issue for me?
#1246

@geoffhumphrey
Copy link
Owner

Confirmed, and thank you for reporting and providing the fix, @jimpdx. For those experiencing this issue, implement the fix described in pull #1246 or download the latest master commit and upload/replace the /sections/pay.sec.php file to your server.

@geoffhumphrey geoffhumphrey self-assigned this Oct 21, 2021
@geoffhumphrey geoffhumphrey added bug confirmed Bug report confirmed in test environment in latest master commit Fix is in latest commit to master. Not in release. v2.3.2 labels Oct 21, 2021
@geoffhumphrey geoffhumphrey added this to the 2.3.2 Release milestone Oct 21, 2021
@grmelacz
Copy link
Contributor

I think this bug might be connected with one that just happened at our competition today. One of the contestants has 2 entries in the competition but the received payment was just for one. He confirmed he payed just for one, though the note in the PayPal transactions displays two: 238|107-108. The problem is both entries were marked as payed though the total was not correct!

I don't wanna hijack this thread, so in case this is a separate problem, please move my comment to a new thread accordingly.
Screenshot 2021-11-22 at 17 43 06
Screenshot 2021-11-22 at 17 42 29

@geoffhumphrey
Copy link
Owner

geoffhumphrey commented Nov 23, 2021

Hello @grmelacz, this could be related if you're not adding the PayPal fees to the entrant's total. The code described in pull #1246 provides a fix.

@grmelacz
Copy link
Contributor

Yes, I do not have adding fees enabled. Makes sense. I've already applied the mentioned fix, will let you know if the bug occurs again. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed Bug report confirmed in test environment in latest master commit Fix is in latest commit to master. Not in release. v2.3.2
Projects
None yet
Development

No branches or pull requests

3 participants