efret has asked for the wisdom of the Perl Monks concerning the following question:

Hi, my sub postal_login in my script, goes to ikobo.com, processes payment to my ikobo account, then returns: RESP=OK from the following line:

print " - <A HREF=$ENV{'SCRIPT_NAME'}\?action=paypal_login\&ALIAS=$for +m{'ALIAS'}\&balance=$balance> PayPal </A>" if ($config{'allowpaypal'} + != 0);
but does not return to the next line of code:
print "<P><A HREF=$ENV{'SCRIPT_NAME'}?action=buynow&category=$form{'ca +tegory'}&item=$form{'item'}>Buy Now</A></FONT>" if (($buyit ne "") & +($bid < $buyit));

Which should display a link that processes the payment to the sellers account (3rd party)... I have tried dozens of ideas from the EA Forum, but no luck Does any one here have any ideas to help me get the 1st line of code to return to the 2nd line of code once the 1st line returns "RESP=OK"? Thanks Gerry

20050204 Janitored by Corion: Added code tags

Replies are listed 'Best First'.
Re: link to outside script
by YetAnotherDave (Beadle) on Feb 04, 2005 at 04:51 UTC
    Sorry, but i can't really help without a bit more code...

    The two links just point back to this node, with no more info...

      THank you, I have to go now, I will try again tomorrow, when I have time to learn how to send code in a better format and can give more information.... THanks again

      I do not understand how to reformat this into a readable format here, please help me learn what I need to do? Here is a line of code that exits my script, goes to ikobo, processes the payment, & returns "RESP=OK" ...

      print " - <A HREF=$ENV{'SCRIPT_NAME'}\?action=paypal_login\&ALIAS=$for +m{'ALIAS'}\&balance=$balance> PayPal </A>" if ($config{'allowpaypal'} + != 0);

      ... I need to find out how to return to the script the same place it exited???
      Can you help?

      20050204 Janitored by Corion: Added code tags

        Ok, Lets try this? These lines of display a "Buy Now" Link:

        <print "<B>Payment Options</B>"; print "<P><A HREF=$ENV{'SCRIPT_NAME'}?action=buynow&category=&item=$fo +rm{'item'}>Buy Now</A></FONT>" if (($buyit ne "") & ($bid < $buyit)); >

        but when I put this line of code before the "Buy Now" link, It goes to Ikobo, processes my payment, returns "RESP=0", and does not process the next line:

        < print " - <A HREF=$ENV{'SCRIPT_NAME'}\?action=paypal_login\&ALIAS +=$form{'ALIAS'}\&balance=$balance> PayPal </A>" if ($config{'allowpay +pal'} != 0); >

        20050204 Janitored by Corion:

        • Added HTML formatting: <p>...</p> around what the author seemed to want to be paragraphs
        • Added <code>...</code> around what the author seemed to want to be code

      The format of the 2 lines of code needed to be re-formatted....I'm not sure how to do this? I read the Writeup Formatting Tips, but don't know Perl Syntax very well, so I am not sure what I need to do to make my code readable? You said you need more code to help me, but I want to send it to u in the proper format if possible? Or can i just try sending you the sub in the current format?
        < print " - <A HREF=$ENV{'SCRIPT_NAME'}\?action=paypal_login\&ALIAS +=$form{'ALIAS'}\&balance=$balance> PayPal </A>" if ($config{'allowpay +pal'} != 0); >

        is this better?

        20050204 Janitored by Corion: Added code tags