Als ik een betaling naar PayPal stuur vanuit een Joomla extension krijg ik automatisch de description: "Payment" Ik wil deze vervangen door de tekst "Registration: yyyymmddxxx" Waarbij "yyyymmddxxx" Het Registratie nummer voorstelt.
Iemand een idee hoe ik dat aanpak? (via een POST/GET vatiabele?)

PS het gaat niet om het maken van het registratienummer dat werkt prima... Alleen het versturen van de tekst!)
laat mij je code eens zien
dan kan ik verder kijken
Dan zal je in de documentatie van die Joomla! extension moeten kijken.

<?php
if ($length >= 1 && $length <= 4) {
    if ($paymenttype == 1) {
        $header = "Location: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=" . $paypal_email . "&item_name=" . $paypal_org . "&amount=" . $amount . "&no_shipping=0&no_note=1&currency_code=" . $currency_code . "&bn=PP%2dDonationsBF&charset=UTF%2d8&return=" . $paypalreturn . "&cancel=" . $paypalcancel;
    } else if ($paymenttype == 2) {
        $header = "Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" . $paypal_email . "&item_name=" . $paypal_org . "&amount=" . $amount . "&no_shipping=0&no_note=1&tax=0&currency_code=" . $currency_code . "&bn=PP%2dBuyNowBF&charset=UTF%2d8&return=" . $paypalreturn . "&cancel=" . $paypalcancel;
    } else if ($paymenttype == 3) {
        $header = "Location: https://www.paypal.com/cgi-bin/webscr?cmd=_cart&business=" . $paypal_email . "&item_name=" . $paypal_org . "&amount=" . $amount . "&add=1&no_shipping=1&no_note=1&currency_code=" . $currency_code . "&bn=PP%2dShopCartBF&charset=UTF%2d8&return=" . $paypalreturn . "&cancel=" . $paypalcancel;
    } else if ($paymenttype == 4) {
        if ($length == 1) {
            $header = "Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=" . $paypal_email . "&item_name=" . $paypal_org . "&no_shipping=1&no_note=1&currency_code=" . $currency_code . "&bn=PP%2dSubscriptionsBF&charset=UTF%2d8&a3=" . $amount . "%2e00&p3=1&t3=D&src=1&sra=1&return=" . $paypalreturn . "&cancel=" . $paypalcancel;
        } else if ($length == 2) {
            $header = "Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=" . $paypal_email . "&item_name=" . $paypal_org . "&no_shipping=1&no_note=1&currency_code=" . $currency_code . "&bn=PP%2dSubscriptionsBF&charset=UTF%2d8&a3=" . $amount . "%2e00&p3=1&t3=W&src=1&sra=1&return=" . $paypalreturn . "&cancel=" . $paypalcancel;
        } else if ($length == 3) {
            $header = "Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=" . $paypal_email . "&item_name=" . $paypal_org . "&no_shipping=1&no_note=1&currency_code=" . $currency_code . "&bn=PP%2dSubscriptionsBF&charset=UTF%2d8&a3=" . $amount . "%2e00&p3=1&t3=M&src=1&sra=1&return=" . $paypalreturn . "&cancel=" . $paypalcancel;
        } else if ($length == 4) {
            $header = "Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=" . $paypal_email . "&item_name=" . $paypal_org . "&no_shipping=1&no_note=1&currency_code=" . $currency_code . "&bn=PP%2dSubscriptionsBF&charset=UTF%2d8&a3=" . $amount . "%2e00&p3=1&t3=Y&src=1&sra=1&return=" . $paypalreturn . "&cancel=" . $paypalcancel;
        }
    }
    if ($paymentlocation != "") {
        $header = $header . "&lc=" . $paymentlocation;
    }
    header($header);
}
?>
Dit is GEEN BUMP maar de oplossing!

Voor het geval iemand met het zelfde probleem:

Ik heb het op gelost door de links aan te passen:

OUDE CODE:

<?php
$header = "Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=" . $paypal_email . "&item_name=" . $paypal_org . "&no_shipping=1&no_note=1&currency_code=" . $currency_code . "&bn=PP%2dSubscriptionsBF&charset=UTF%2d8&a3=" . $amount . "%2e00&p3=1&t3=M&src=1&sra=1&return=" . $paypalreturn . "&cancel=" . $paypalcancel;
?>


NIEUWE CODE:

<?php
$invoice = "yyyymmddxxx" #wordt gevuld door een functie!
$header = "Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=" . $paypal_email . "&item_name=Invoice:" . $invoice . "&no_shipping=1&no_note=1&currency_code=" . $currency_code . "&bn=PP%2dSubscriptionsBF&charset=UTF%2d8&a3=" . $amount . "%2e00&p3=1&t3=M&src=1&sra=1&return=" . $paypalreturn . "&cancel=" . $paypalcancel;
?>


Zoek de verschillen en kleur de plaatjes!

Reageren