Paynow amount variations


#1

Is it just me or you also facing this issue, iam posting amount of 12 to paynow using 3rd part integration the client sees a different amount and its fluctuates every request.

1st attempt sending $12 it showed as $110.20

2nd sending $12 gain showed as $232.65

3rd attempt send $12 showed $244.90

4th attempt sending 12 again showed $257.14


#2

I have been experiencing this too , i thought it was an issue of having persistent transactions.Hopefully we’ll get a fix on this issue


#3

I just checked the request coming in from the notification email displayed in your screenshot . The amounts shown in your screenshots match what was received by the Paynow server as an incoming requests.

We are currently testing the Python SDK to try replicate what you are getting. Meanwhile may you share
1)The logs from your server
2)the version number of the Python SDK you are using
3)and the stack your are running

@MarlvinzW , may you provide in the same details from your end .


#4

1.ubuntu server
2.python 3.6
3.django


#5

@Harvey i was sending $12 to the server for processing here are the logs


#6

are you doing all these requests within 5 minutes ?


#7

2 were within 5 minutes


#8

i would be happy if the first time request would appear as 12 or 12 + transaction fee, not that kinda amount


#9

Thank you @iamthatchic and @MarlvinzW , I managed to replicate the issue , we are investigating further. I will update as soon as I can


#10

mavapapi ndakuda kushandisa.


#11

hello paynow, kindly asking if we are going to have a solution ASAP or i should look for an alternative @Harvey


#12

@iamthatchic Can you help me on how to reproduce the error, seems to be working fine on my side, even for requests within 5 minutes.


#13

@iamthatchic @MarlvinzW . How are you creating your Paynow instances ?

Are you instantiating the Paynow class on demand or the instance is instantiated on server startup ?


#14

it’s being instantiated on demand


#15


#16

try the opposite by instantiating on server startup and use setters when creating a new transaction then try again to reproduce the problem.


#17

Hello all, I think I found the solution for this in this thread Transaction Lifecycle API


#18

Hi there @paynow, did we manage to get the solution to this bug, am currently experiencing the same issue… kindly assist

Django 3.0
python 3.8


#19

I was facing the same issue on django python

Problem
when i do:

 `paynow.send_mobile()`

The amount kept incrementing everytime i do a request with a new amount.

Solution:
Reload the paynow module

example code:

imports

from importlib import reload
import paynow

class MyClass:
    def __init__(self, var1 str):
         self.var1 = var1
         reload(paynow)

@staticmethod
def send_money():
    ..........................
    response = paynow.send_mobile(..........)

NB: Not sure if this is good practice or not but it works lol

Happy coding

nigelreign


#20

After creating your payment with:

payment = paynow.create_payment('Order #100', 'test@example.com')

Add this line of code below to initialize an empty payment list :

payment.items = []

So your code must look like this:

 payment = paynow.create_payment('Order #100', 'test@example.com')
 payment.items = []
 payment.add('Purpose of payment', 100)

Hope this helps someone, this worked for me using Django 3.1 and Python 3.8

#GetPaid