Viewing 15 replies - 1 through 15 (of 21 total)
  • Hi Chrissi

    I get a 404 error on both those pages. Which is probably why it’s not working.

    You can add a query to any URL, the plugin doesn’t restrict what you do.

    Thread Starter chrissi_lisa

    (@chrissi_lisa)

    When I take the startpage its the same – no redirection…

    The redirection is a PayPal function. All the plugin does is tell PayPal what URL to use for cancel or return.

    I’ve just tested the redirection on three sites and it works so something strange is happening with your form. Can you post the URL of your payment page so I can do some tests.

    Thread Starter chrissi_lisa

    (@chrissi_lisa)

    Hi aerin,

    here is the page https://www.veranstaltungen-regional.de/angebot-eintragen.php

    Thanks

    • This reply was modified 7 years, 3 months ago by chrissi_lisa.

    Check your paypal sandbox account – I get a ‘not working’ message from paypal. Using the sandbox may be why the cancel/return URL’s aren’t working.

    I did note that your paypal form isn’t loading correctly – the fields should clear on focus but they don’t so I suspect there is a conflict with your form.

    Thread Starter chrissi_lisa

    (@chrissi_lisa)

    I deleted the sandbox-option – now I get

    “Things don’t appear to be working at the moment. Please try again later.”

    The shortcode isnt within another <form>

    I got the mail:

    “Order Details:

    Zahlung für:1 Angebot auf https://www.veranstaltungen-regional.de

    Quantity: 1

    50 €: 100.00”

    What does this mean ? The email I typed in has no money on the account – so I had to get an error-message.

    That was my test order. You have the amount field set up with 50 €. If this is a fixed amount you need to change the settings. If not, change the label to ‘Betrag’.

    The not working message is paypal indicating there is an issue with your form or your account settings.

    And the paypal form is on the same page as your other form – there may be a conflict.

    I’ve looked at your form settings and the cancel and return URLs will never work. https://www.veranstaltungen-regional.de/paypal-success.php doesn’t exist. You need to enter the URL of an actual page.

    so there are a whole load of issues that need to be resolved for everything to work as it should.

    Thread Starter chrissi_lisa

    (@chrissi_lisa)

    ok, now the sites are working.

    I need to overgive an ID in the URL – is it possible to set the cancel und success-pages in the shortcode?

    It is possible to do this but it’s not a quick fix. If you are able to contribute towards the development cost I can do this for you.

    Thread Starter chrissi_lisa

    (@chrissi_lisa)

    I think that could be interesing for other users too.

    Thread Starter chrissi_lisa

    (@chrissi_lisa)

    Is there another way to check in the php-script wether the payment was successful?

    Where can I find all shortcode-atributes?

    Best regards,
    Chrissi

    IPN will report successful payments as will the in-context checkout available in the pro version.

    All the shortcodes are here: https://quick-plugins.com/quick-paypal-payments/paypal-payments-shortcodes/

    Thread Starter chrissi_lisa

    (@chrissi_lisa)

    I have the solution: I overgive the ID in a SESSION

    Thread Starter chrissi_lisa

    (@chrissi_lisa)

    I found out that is nessacary to define a listener-Skript an set the Listener-URL to the IPN options. I wrote this script, but even when the payment was successful there is no update:

    <?php

    /*global $theme;

    get_header();*/
    include (“wp-config.php”);
    global $wpdb;

    //Build the data to post back to Paypal
    $postback = ‘cmd=_notify-validate’;

    // go through each of the posted vars and add them to the postback variable
    foreach ($_POST as $key => $value) {
    $value = urlencode(stripslashes($value));
    $postback .= “&$key=$value”;
    }

    // build the header string to post back to PayPal system to validate
    $header = “POST /cgi-bin/webscr HTTP/1.0\r\n”;
    $header .= “Content-Type: application/x-www-form-urlencoded\r\n”;
    $header .= “Content-Length: ” . strlen($postback) . “\r\n\r\n”;

    // Send to paypal or the sandbox depending on whether you’re live or developing
    // comment out one of the following lines
    //$fp = fsockopen (‘ssl://www.sandbox.paypal.com’, 443, $errno, $errstr, 30);//open the connection
    $fp = fsockopen (‘ssl://www.paypal.com’, 443, $errno, $errstr, 30);
    // or use port 443 for an SSL connection
    //$fp = fsockopen (‘ssl://www.paypal.com’, 443, $errno, $errstr, 30);

    if (!$fp)
    {

    // HTTP ERROR Failed to connect
    //error handling or email here
    }
    else // if we’ve connected OK
    {

    fputs ($fp, $header . $postback);//post the data back
    while (!feof($fp))
    {
    $response = fgets ($fp, 1024);

    //It’s verified
    if(strcmp($response,”VERIFIED”) == 0){

    // assign posted variables to local variables, apply urldecode to them all at this point as well, makes things simpler later
    $payment_status = $_POST[‘payment_status’];//read the payment details and the account holder

    if($payment_status == ‘Completed’)
    {
    $unique_id = $_SESSION[‘unique_id’];

    $abfrage = “UPDATE eigene_angebote SET bezahlt = 1, bezahlt_am = NOW()
    WHERE unique_id='”.$unique_id.”‘”;

    $result=$wpdb->get_results($abfrage, ARRAY_A);

    }
    else if($payment_status == ‘Denied’ || $payment_status == ‘Failed’ || $payment_status == ‘Refunded’ || $payment_status == ‘Reversed’ || $payment_status == ‘Voided’)
    {

    }
    else if($payment_status == ‘In-Progress’ || $payment_status == ‘Pending’ || $payment_status == ‘Processed’)
    {
    //Do something
    }
    else if($payment_status == ‘Canceled_Reversal’)
    {
    //Do something
    }
    }
    else if (strcmp ($response, “INVALID”) == 0)
    {
    //the Paypal response is INVALID, not VERIFIED
    }
    } //end of while
    fclose ($fp);
    }
    ?>

    You don’t need a listener script. The plugin already has a listener script and the IPN page gives you the listener-URL.

    This will not fix the redirection pronlem. Your redirection problem is caused by using URLs for pages that do not exist.

    Create the thank-you and error pages and it will work.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Cancel and Thank you pages not working’ is closed to new replies.