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

Call back doesnt work #20

Open
sladejnr opened this issue Jun 4, 2024 · 5 comments
Open

Call back doesnt work #20

sladejnr opened this issue Jun 4, 2024 · 5 comments

Comments

@sladejnr
Copy link

sladejnr commented Jun 4, 2024

Problem/Motivation

(Why the issue was filed, steps to reproduce the problem, etc.)
i updated my WHMC plugin with the new release but after successful payment no response from paysatck so i always have to manually mark the invoice as paid

Proposed resolution

(Description of the proposed solution, the rationale behind it, and workarounds for people who cannot use the patch.)
callback file i believe, is not working well

Repeatable

Always|Sometimes|Specific conditions|Specific times

(If it is a bug, you are reporting lease specify:)

Steps to repeat: (Describe how the issue can be repeated by someone who is to work on it)

  1. Step 1
  2. Step 2
  3. ...

Expected Results:

(What you expected steps 1, 2 and 3 to give)

Actual Results:

(What is gave including any error messages, memory dump etc that can help)

@bluesteamhost
Copy link

Same problem here! I upgraded to the latest version because the fees were not being included in the callbacks and this version is meant to fix the fees. Now this version is worse than before as it is not even marking the invoice as paid or adding the transaction or fees.

@SwimGeek
Copy link

Hi

Also noticed this issue.

Syntax error in callback / paystack.php

Fairly easy to fix, but would be nice to run an official release without modified code on our side.

@bluesteamhost
Copy link

@SwimGeek
Could you share the syntax fix so we can temporarily use the gateway?

@SwimGeek
Copy link

SwimGeek commented Aug 26, 2024

Hi

Just needed some { }

$amount = floatval($txStatus->amount)/100;
$requested_amount = floatval($txStatus->requested_amount)/100;
if (isset($requested_amount) && $requested_amount > 0) {
    $amount = $requested_amount;
    $fees = floatval($txStatus->fees)/100;
}

@bluesteamhost
Copy link

Hi

Just needed some { }

$amount = floatval($txStatus->amount)/100;
$requested_amount = floatval($txStatus->requested_amount)/100;
if (isset($requested_amount) && $requested_amount > 0) {
    $amount = $requested_amount;
    $fees = floatval($txStatus->fees)/100;
}

Thank you! I also had to add a semi-colon at the end of this line after adding the first {
$amount = $requested_amount;

I REALLY cannot understand how this passed user testing!! I have made the necessary changes and hopefully it will work now. Amazing that the community has to resolve these issues for the devs.

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

No branches or pull requests

3 participants