Don't work PayPalAnswered

Hi evreyone. I have a problem.
I want to make automaticaly payment and activation send process, but it is not working.
I normaly recave payment but activation key didn't send to buyer and even didn't generating.
I read this forum and untherstand that it can be happen when in server didn't work mail option.

In my server there is no any mail, pop3, ismp server. I use diferent smtp server (in my it is Yandex).
Wanted to ask, it is real to configure automatic payment if in aur server no mail services?

Answer

Enable logging in the script. It will tell you exactly what is wrong and what you need to fix.

Here what i can see in log

[11/13/2023 4:13 PM] - SUCCESS :paychecker intiated by 173.0.XX.XXX
[11/13/2023 4:13 PM] - SUCCESS :Validating PayPal order 1
[11/13/2023 4:13 PM] - FAILURE :IPN validation failed.

What is IPN?

, edited

https://developer.paypal.com/api/nvp-soap/ipn/IPNIntro/

Instant Payment Notification (IPN) is a message service that notifies you of events related to PayPal transactions.

Likely something is configured incorrectly in the script. Fix your configuration and add more debugging if you need to. Or use a payment providers that works better (like Authorize.net).

How i remember there is only one configuration for Paypal, just write email, or not?

can it be becose off that my email in wyday.com is different my Paypal email?

I have found a similar thread https://wyday.com/forum/t/3289/ipn-validation-failed/

There how i untherstan problem was in old PHP version, i just check and i have PHP 7.2.24.

Add more debugging to the script. Make sure your PaymentSetting.php is setup correctly.

Or, better yet, switch to Authorize.Net.

How i can add more debugging?

That's a huge topic covered in basic programming classes. I'd advise switching to a more robust and better written payment method like Authorize.Net.

Or manually processing payments until you can hire someone to handle this for you.

Merchants create an IPN listener page on their website and then specify the URL of the listener page in their PayPal account profile. PayPal then sends notifications of all transaction-related events to that URL. When customers pay for goods or services, PayPal sends a secure FORM POST containing payment information (IPN messages) to the URL. The IPN listener detects and processes IPN messages using the merchant backend processes. The IPN listener page contains a custom script or program that waits for the messages, validates them with PayPal, and then passes them to various backend applications for processing.

I have found that in PayPal website. Wich ulr i have to provide in my PayPal account for IPN?

The page sends it to PayPal. Just switch to Authorize.Net. They're a much more reputable company, anyway.

Authorize.Net is expansive for my program and i am fom Armenia, don't shore that i can recave payments from them.

For me ideal variant is a PayPal.

For test i configures Authorize.Net test account and imediatly after i enable Authorize.Net, know by /buy/payment.php is blank white.

Or error 500.

I am turning off Authorize.Net and page again working.

Something wrong in your PHP files, i just install them again and again didn't work.

Sorry, we don't provide programming support. Currently there is a learning curve that requires fairly basic programming skills.

I'd say either hire someone or process payments manually until you can hire someone.

I have found a priblem in file paychecker.php
I have changed

if ($PayPalSandbox)
        $request = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr');
    else
        $request = curl_init('https://www.paypal.com/cgi-bin/webscr');
with

if ($PayPalSandbox)
        $request = curl_init('https://ipnpb.sandbox.paypal.com/cgi-bin/webscr');
    else
        $request = curl_init('https://ipnpb.paypal.com/cgi-bin/webscr');
 

Sandbox mode know work perfect.

But, when i am trying with real account pay sended but there is no activation kod generated and there is nothing in log file.

Why nothing in log file?

After changing one more in paychanger.php file ganareation is working.

Find thise

    if (stristr($ipn_response, 'VERIFIED'))
    {
        // Valid transaction.
        debug_log('IPN successfully verified.',true);
        return true;
    }
    else
   {
        // Invalid transaction. Check the log for details.
        debug_log('IPN validation failed.',false);
       return false;
   }
 

And replace with thise    
    if (strcmp ($ipn_response, 'VERIFIED')) {
        debug_log('IPN successfully verified.',true);
        return true;
    } else if (strcmp ($ipn_response, 'INVALID')) {
        debug_log('IPN validation failed.',false);
        return false;
    }
}

Know everythink working but didn't send email.

My server didn't have mail, smtp, pop3 server it is working with diferent smtp server (in my it is Yandex), how we can configure that?

My last PayPal account was from German and options in this thread help make it work.
Know i have PayPal account from US and it didn't work again)))

It is start working after backchabging this:

if ($PayPalSandbox)
        $request = curl_init('https://ipnpb.sandbox.paypal.com/cgi-bin/webscr');
    else
        $request = curl_init('https://ipnpb.paypal.com/cgi-bin/webscr');
with

if ($PayPalSandbox)
        $request = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr');
    else
        $request = curl_init('https://www.paypal.com/cgi-bin/webscr');