Jump to content
  • 0

Package upgrades and paypal not working


SSy

Question

Hi there - currently when a user signs up they go through the checkout and there is no problem - the paypal payments link shows up.

But if they try to make a payment for an outstanding invoice, they get to the 'Confirm payment' page but there is no link to make payment. It just says their address along with 'PayPal payments standard', and a button to 'Edit Payment' on the bottom.

Any advice on how to enable the PayPal payment button?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Upon further investigation it appears the 'gateway_buttons' variable is not being set properly by the PayPal module. When I var_dump the 'gateway_buttons' variable I get this:

array(1) { ["paypal_payments_standard"]=> array(0) { } }

Any clue how to get this populated with the correct button?

Link to comment
Share on other sites

  • 0

Upon further investigation it appears to be a bug with the PayPal module:

        switch ($this->ifSet($this->meta['pay_type'])) {
            case "both":
                if ($recurring_btn)
                    return array($regular_btn, $recurring_btn);
                return $regular_btn;
            case "subscribe":
                return $recurring_btn;
            case "onetime":
                return $regular_btn;

In this case, it is set to 'subscribe' but the recurring_btn variable is not set because the $recurring_fields variable is never set.

This is when trying to upgrade a yearly package.

I have added this code above the snippet above as a temporary hack:

if (!$recurring_btn) $recurring_btn = $regular_btn;

Please advise on an actual fix for this issue.

 

Link to comment
Share on other sites

  • 0

Determined the issue arises if you have 'subscription only' selected in the PayPal payment gateway settings.

However, I'm confused - if someone upgrades their package, shouldn't Blesta cancel the old one and create a new one with a prorated difference? That's what a previous CP i was using did. The way it currently works it seems to just get a one time payment for the difference and leave the original subscription running.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...