This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Issue with xBilling
#1
Issue with xBilling
modpluz, are you around buddy? How's things going? I think I have finally tracked down the issue I am having.

It seems the invoice values do not get converted into the paypal button, more specifically the values in {{...}} are not being filled (invoice, amount, etc.), but the settings for xBilling are. (Email, ipn_notify and return).


I'll keep digging...
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#2
RE: Issue with xBilling
Hey TGates, I'm here Big Grin Things are going quite well, thanks.

As per the issue mentioned above, my xbilling dev setup is outputting the correct amount into the PayPal button(as per the screenshot) and this is running off the same code as per the zppy repo.

Can you perhaps log the payment process from start to finish? Before and after payment is made that is (I suspect something wonky is going on there).


Attached Files Thumbnail(s)
   
Remi - Software Engineer,  Sentora Module Developer,  Owner, imerLabs


Please mark threads as SOLVED if your problem has been resolved.
Do not PM Staff Members for help unless asked to do so, this is so that others can benefit from your solution.
Do a SEARCH before asking in the forums, a solution may already exist.
Reply
Thanks given by:
#3
RE: Issue with xBilling
When I view the invoice, this is what the paypal button looks like:
   
As you can see, it is not populating all the values. (I'm using sandbox, but that should not matter.)
Doing some more digging today.

Source view, another invoice (Change real domain to 'domain.com'):

PHP Code:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <
input type="hidden" name="cmd" value="_xclick">
    <
input type="hidden" id="payment_method_id" name="custom" value="">
    <
input type="hidden" name="business" value="sales-facilitator@domain.com">
    <
input type="hidden" name="lc" value="{{country_code}}">
    <
input type="hidden" name="item_name" value="{{invoice_desc}}">
    <
input type="hidden" name="invoice" value="{{invoice_id}}">
    <
input type="hidden" name="amount" value="{{invoice_amount}}">
    <
input type="hidden" name="currency_code" value="{{currency}}">
    <
input type="hidden" name="discount_amount" value="{{discount_rate}}">
    <
input type="hidden" name="notify_url" value="https://www.domain.com/signup/ipn_listener.php">
    <
input type="hidden" name="return" value="https://www.domain.com/signup/view_invoice.php?invoice={{invoice_id}}">
    <
input type="hidden" name="button_subtype" value="services">
    <
input type="hidden" name="no_note" value="0">
    <
input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
    <
input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <
img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</
form

PS: all data is in the DB.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#4
RE: Issue with xBilling
Interesting, copied the code directly from github and it appears to be working again.

Now issue is after payment, invoice is still 'pending'. Payment was successful.

Ripping apart the listener now..
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#5
RE: Issue with xBilling
Finally! I seemed to have found it!

In ipn_listener.php line 79:

PHP Code:
if (strcmp ($res"VERIFIED") == 0) { 

Changed to:
PHP Code:
if (strcmp ($res"verified") == 0) { 
And it works. strcmp is case sensitive.
May need to add a check to convert 'verified' to either upper or lower case to make sure this check always works regardless of upper/lower case.

@[modpluz],
UPDATE:
Everything seems to be working now. I updated the listener with the following fix:
In ipn_listener.php line 79:

PHP Code:
Code:
if (strcmp ($res, "VERIFIED") == 0) {
TO
PHP Code:
if ((strcmp ($res"VERIFIED") == 0) || (strcmp ($res"verified") == 0)) { 

I also updated the main signup to use the new 'I'm not a robot' verification.
Will post my changes to your Github Big Grin
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#6
RE: Issue with xBilling
Hehe...good eye! I just merged your pull request Big Grin
Remi - Software Engineer,  Sentora Module Developer,  Owner, imerLabs


Please mark threads as SOLVED if your problem has been resolved.
Do not PM Staff Members for help unless asked to do so, this is so that others can benefit from your solution.
Do a SEARCH before asking in the forums, a solution may already exist.
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
[MODULE] xBilling modpluz 239 835 ,026 04-17-2020, 11:37 PM
Last Post: emmarudd222@gmail.com
xbilling Wordpress samuelmed 1 5 ,003 11-13-2019, 09:27 AM
Last Post: TGates
[split] Issue with xBilling blackvai 1 5 ,341 04-03-2019, 11:39 PM
Last Post: TGates

Forum Jump:


Users browsing this thread: 2 Guest(s)