Coder Social home page Coder Social logo

strangerstudios / pmpro-add-paypal-express Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 19.0 48 KB

Appeal to the highest number of potential customers by offering PayPal as a payment option in addition to your onsite credit card payment gateway.

Home Page: https://www.paidmembershipspro.com/add-ons/plus-add-ons/pmpro-add-paypal-express-option-checkout/

PHP 97.55% CSS 2.45%
strangerstudios-product paid-memberships-pro wordpress wordpress-plugin

pmpro-add-paypal-express's Issues

Discount code makes a level free

Applied this add-on and get it working with Paypal. After testing, it shows a payment has come through in the amount of agreed checkout price, but with $0 received. And the Paypal I used to make the payment shows no log history of the payment (probably because it was for $0).

This was from a discount code. What is the fix for the discount code problem. Thanks!

RESOLVED: it appears that Paypal takes a little while to actually pull the funds. Though my Paypal account showed a recurring payment of x amount, it still had a $0 transaction. Then the transaction for the x amount went through a little while later. So, if you run across the same issue, be patient and wait for Paypal to mosey on down the road to fulfill the payment. It won't work as fast as Authorize.net. But it will work.
High Five for this add-on!

Billing Information section hidden when switching gateway after checkout error

There is a bug where the "Billing Information" and "Payment Information" sections do not show on the screen when the user tried checkout via PayPal and then had checkout errors.

To recreate:

  • Partially complete checkout page
  • Select "Check out with PayPal
  • Click the button to submit / pay at PayPal
  • Error message appears that required fields are missing
  • Swap selection back to "Check Out with a Credit Card Here"
  • Billing and Payment Information fields do not display.

Asterisk next to address fields disappear after clicking on PayPal button

Here’s how to reproduce the problem.

  1. Go to the page and click on the radio button for Check Out with PayPal
  2. Click on the button all the way at the bottom that says PayPal Check out (The safer, easier way to pay)
  3. Click on the radio button that says Check Out with a Credit Card

Now you will see all the asterisks are gone.

Related ticket: https://www.paidmembershipspro.com/forums/topic/asterisk-next-to-address-fields-disappear-after-clicking-on-paypal-button/

Cancelling current subscriptions too early

If a user has an active subscription (paying with Stripe, most likely other gateways but I'm unable to test) and they go to change level, select 'Checkout with Paypal' but fail to complete payment, their Stripe subscription is cancelled regardless of whether the Paypal payment is completed or not.

Should the current subscription not be cancelled after confirmation of the new payment?

This obviously only happens with this plugin, as it requires multiple gateways, but the issue appears to come from the pmpro core code.

PayPal Express option is not showing for a donation only level.

Describe the bug
When a free level is set to accept donations, (PMPro Donations Add On), and the user selects to make a donation the option to select PayPal Express as a payment method is not displayed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Memberships > Settings > Levels and create a free level and enable accepting donations for this level.
  2. Go to the membership checkout page and select or enter a donation amount greater than 0
  3. Scroll down to notice that the "Choose Your Payment Method" section is not displayed and that only the default payment gateway is shown on the page in the "Payment Information" section

Screenshots

2023-10-04_06-45-23
2023-10-04_06-49-30

Expected behavior
PayPal Express is available as an optional payment gateway for donation-only levels.

Isolating the problem (mark completed items with an [x]):

  • This bug happens with a default WordPress theme active, or Memberlite.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

Paid Memberships Pro v2.12.3,
Add PayPal Express Add On v.6,
Donations v1.1.3

Payment button not re-enabled (fix included!)

When a user submits incorrect payment info with Stripe and the transaction fails, the "Submit" button is re-enabled but the PayPal button is not. This issue occurs when Stripe and PayPal are both allowed as checkout options.

The button is not enabled because the code found in stripeResponseHandler() does not not re-enable image type buttons. The current code is:

if (response.error) {
 // re-enable the submit button
jQuery('.pmpro_btn-submit-checkout,.pmpro_btn-submit').removeAttr("disabled");
…

This can be fixed by simply adding the image type to the attributes to enable with jQuery:

if (response.error) 
{
// re-enable the submit button and PayPal button
jQuery('.pmpro_btn-submit-checkout,.pmpro_btn-submit,input[type="image"]').removeAttr("disabled");
…

PayPal requires Credit Card

After add pmpro-add-paypal-express plugin and select PayPal for pay the subscription the form requires Stripe form data, any idea?

Thanks!

Should be possible to define which payment method use as default

To overcome this missing feature I had to manually edit the code.

But there is a weird case:

  1. Manually switch to Credit Card (which is not the default option anymore in my case)
  2. Use a valid card not enabled for online payments (wise.com virtual cards for testing purposes)
  3. Checkout -- page reloads with error "Your card was declined."
  4. Now the default payment method is selected and credit card filled data is lost.

PayPal Express Checkout issue

Hello, some issues when paid with PayPal Express Checkout

== Paid Memberships Pro - Add PayPal Express Add On ==
Contributors: strangerstudios
Tags: pmpro, paid memberships pro, gateway, paypal, checkout, registration
Requires at least: 3.6
Tested up to: 4.7.2
Stable tag: .5.1

Warning: Creating default object from empty value in /home/my-domain/public_html/wp-content/plugins/pmpro-register-helper-fields/pmpro-register-helper-fields.php on line 482

Warning: Attempt to assign property of non-object in /home/my-domain/public_html/wp-content/plugins/pmpro-register-helper-fields/pmpro-register-helper-fields.php on line 483


Warning: strlen() expects parameter 1 to be string, object given in /home/my-domain/public_html/wp-content/plugins/paid-memberships-pro/includes/functions.php on line 691

Warning: substr() expects parameter 1 to be string, object given in /home/my-domain/public_html/wp-content/plugins/paid-memberships-pro/includes/functions.php on line 691

Warning: Cannot modify header information - headers already sent by (output started at /home/my-domain/public_html/wp-content/plugins/pmpro-register-helper-fields/pmpro-register-helper-fields.php:482) in /home/my-domain/public_html/wp-includes/pluggable.php on line 1210

	if($gateway == 'paypalexpress')
	{
		$AccountNumber->required = false;
		$ExpirationMonth->required = false;
	}

PayPal button disable bug

If you click the "Submit and Checkout" button with incorrect info, it correctly removed the "disabled" flag on the check out button, but it doesn't remove the "disabled" flag for the PayPal button. This needs to be changed in the main PM Pro plugin.

In preheaders/checkout.php, add this line to function stripeResponseHandler():
jQuery('input[type="image"]').removeAttr("disabled"); //Removes disabled from PayPal button

Additionally, I have problems with the "Billing Address" appearing with Stripe after you try to purchase with PayPal unsuccessfully. When you switch back to the Pay with credit card here" option the billing address shows even though it's set not to. I had to manually remove the jQuery.show() billing field.

Bad card data still goes through

We've had some customers setting up accounts without actually being charged due to what we think is a bug in this add-on. We use the stripe gateway along with this paypal option. Customers will receive the account created email from PMPro but no confirmation of payment. This has happened multiple times and we think it is because users who have out-dated/bad card data in paypal are still able to proceed with checkout. See below for a comment from a user who kindly explained what happens:

"Ok no problem. I just noticed that there was a problem with the card in my paypal account.
Think there is a glitch when you sign up with paypal and the card information is out of date. Paypal sends an error but only after your website receives an ok so it seems."

Invoice email not being sent

We have Stripe and this PayPal Express add-on for accepting payments on our site. Our members that pay with a credit card via Stripe all receive Invoice emails. However, all our members that pay with PayPal DO NOT have outgoing Invoice emails sent to them.

We also have the Email Templates addon to help manage the emails and the Invoice template is not disabled.

Can the PMP team please review this asap? We have received multiple disputes from members stating they never received an Invoice email which has resulted in us refunding them.

To help us verify this, we use the WordPress plugin MailPoet and SendGrid as our email gateway that logs all outgoing emails from our WordPress site.

PayPal Express vanished from PMPro Payment Settings page

I had installed “Add PayPal Express as an Alternate Payment Option at Checkout” and it was working fine. But after recent update it vanished. I tried removing the plugin and re-installing but though the plugin is active in plugins list…I don’t see PayPal Express settings in the PMPro Payment Settings page.

ENHANCEMENT: Reset to primary gateway when saving Paypal Express Option add-on settings

A user requested that when the PayPal Express Option add-on is active and configured on the system, any Payment Settings save operations always resets back to the primary/master payment gateway settings (the one selected/saved/active prior to navigating to the PayPal Express gateway in the "Payment Settings").

This is to avoid situations where they forget to (re)save the master/primary gateway on the Payment Settings page as the gateway to use after editing PayPal Express settings.

pmpro_requirebilling

The radio fields are still showing when the pmpro_requirebilling fitler is false.

It works in the basic checkout.php when I don't have this enabled.

So, when I use a discount code that brings the total to $0, the "Choose Payment Method" with radio button options are still visible and they shouldn't be.

I've been messing around for a bit, but I can't figure it out.

Original payment method is submitted after entering a discount code

If a discount code is entered after selecting 'Check Out with PayPal', the payment is submitted to the original payment method.

Have only confirmed this with Stripe as the original payment method.

To recreate:

  • Select 'Check Out with PayPal'
  • Enter a discount code
  • Click the PayPal image
  • Response from Stripe: Could not find payment information

Causes checkout to freeze

Installed plugin, set Paypal Express email and hit save. Then switched back to Stripe and hit Save. Went to Membership Levels, selected level that took me to checkout. I see two two radios for credit card and for paypal. However, the page is just "loading" and neither radio link works.

PMPRO: Version 1.8.8.3
Wordpress: 4.4.2

Use with paypal standard.

Can it work with paypal standard? Some of my customers don't want to register for a paypal account, just want to pay via visa card.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.