[ic] PaypalExpress.pm: improvements

Frank Reitzenstein frank at goldissue.com
Sat Jul 7 04:39:38 EDT 2007


Dear Frank,

At 02:42 AM 7/7/2007,
Frank Reitzenstein <frank at goldissue.com> wrote:

> Ton Verhagen wrote:
>
> > Dear All,
> >
> > When using Lyn's PaypalExpress.pm payment module we
> > encountered frequent problems connecting to PayPal.
> >
> > Many errors like the one below were written to the error.log file:
> > 500 Can't connect to api-3t.paypal.com:443 (Bad hostname
> > 'api-3t.paypal.com')
> >
> >
> > In order to improve stability/reliability I added a retry mechanism on
> > every soap call made to PayPal.
> >
> > The default number of retries has been set to 3, but will be
> > made configurable later.
> >
> > Anyone who would like to test this patch is invited to contact me
> > and I will send the patched PaypalExpress.pm module to you.
> >
> > Many thanks guys !
> >
> >
> > Best regards,
> >
> > Ton
> >
> > --
> > Alamerce Nederland --- Cornerstone of eBusiness
> > Phone +31-40-2374381    info at alamerce.nl    http://www.alamerce.nl
> >
> > eCommerce Solutions -- Consulting -- Website & Interchange Hosting
> >
> > _______________________________________________
> > interchange-users mailing list
> > interchange-users at icdevgroup.org
> > http://www.icdevgroup.org/mailman/listinfo/interchange-users
> >
> Hello Ton,
>
> I have permanently solved all PayPal related issues. When I sold this
> product:
>
> http://www.theyoungjerk.com/SC-022.html
>
> They promptly closed my account and would not enter into a dialogue. As
> it turns out the issue was over pharmaceutical growth hormone, whereas
> this is a homeopathic remedy. The double speak in their replies was
> beyond belief.
>
> I had to ship an order a day for 30 days before I was ready to recover
> payments.
>
> They still sent me very authoritarian emails much later (after I
> accepted payments through my bank) so I sent them an email:
>
> **** off.
>
> They have not replied since. I also closed both ebay acounts, and
> politely reminded ebay that subsequent promotional emails require an
> "opt out" link by law.
>
> I heard about this before it happened to me.
>
> Be warned.

Thank you for your response, Frank !

I am wondering how you solved all those PayPal issues.
Where your solutions the reason of PayPal closing your accounts?

Would you be willing to share your solutions with the IC community
and/or discuss them with me?

I am sure there must be a way to solve all problems in a way
acceptable to PayPal/eBay.

Many thanks for your kind attention.

Take care !

Best regards,

Ton

-- 
Alamerce Nederland --- Cornerstone of eBusiness
Phone +31-40-2374381    info at alamerce.nl    http://www.alamerce.nl

eCommerce Solutions -- Consulting -- Website & Interchange Hosting


Hello Ton,

Thankyou for your reply. I decided to reply to the group as the email
ended up on my server and had to be forwarded anyway. I am sorry to get
your hopes up. What I was using was a hacked version of receipt.html
which worked well in that I was still making those sales, in spite of
some added inconvenience to the customer.

In summary the receipt page gives a warning that the transaction was not
complete, and that the customer should click on the button, resulting in
a visit to my normal ebay account with the customers details preloaded.

I am reasonably certain that this is of no use to you.

Ebay have regulations about things like pornography and pharmaceuticals.
They closed my account saying that I was selling pharmaceutical
products. Of course homeopathic remedies are made by diluting the
substance until there is not a single molecule left, and are not
pharmaceuticals. I have heard before that they close accounts and that
there is NO MEANINGFUL DIALOGUE. Sorry for taking up your time with
this, but it may well be useful to one of you one day,

Regards,

Frank Reitzenstein.

[comment]
ui_template: Yes
ui_template_name: noleftapollo
[/comment]

[tmp page_title]__COMPANY__ -- [L]Receipt[/L][/tmp]

@_NOLEFT_TOP_APOLLO_@

<!-- BEGIN CONTENT -->
[if value mv_order_profile eq paypal]


<!--
Portions of the code below are copyrighted 2002 by Scott Kennedy. All
rights reserved.
Code may be freely used and redistributed as long as this message is
left intact.
Contact information:
Custom Web Promotions
1210 E. Main
Tishomingo, OK 73460
(580) 371-2528
http://custweb.com
scott AT custweb.com
-->
[seti paypal_button]
[perl]
$phone_night = $Values->{phone_night};
$phone_day = $Values->{phone_day};
# Strip unwanted characters
# PayPal only allows digits
$phone_night = $Tag->filter('digits', $phone_night);
$phone_day = $Tag->filter('digits', $phone_day);
# Group digits of each phone number into three parts
# Phone number format PayPal uses is AREA CODE / PREFIX / NUMBER
$phone_day =~ /(\d\d\d)(\d\d\d)(\d\d\d\d)/;
$Tag->set('day_phone_a', $1);
$Tag->set('day_phone_b', $2);
$Tag->set('day_phone_c', $3);
$phone_night =~ /(\d\d\d)(\d\d\d)(\d\d\d\d)/;
$Tag->set('night_phone_a', $1);
$Tag->set('night_phone_b', $2);
$Tag->set('night_phone_c', $3);
[/perl]
[calc]
sub formatamount {
     my($subtotal,$x) = @_;
    return sprintf("%.2f",$subtotal);
    }
[/calc]

[item-list modular=1]
[tmp ourbasket][perl
no_return=0]$Scratch->{ourbasket}[/perl][item-quantity] [item-data
products description] [/tmp][/item-list]

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="frank at goldissue.com">
<INPUT TYPE=hidden NAME="amount" value="[calc]formatamount('[total-cost
noformat=1]')[/calc]">
<INPUT TYPE=hidden NAME="shipping" value="">
<INPUT TYPE=hidden NAME="shipping2" value="">
[if ! value fname]
<INPUT TYPE=hidden NAME="first_name" value="[value b_fname]">
[else]
<INPUT TYPE=hidden NAME="first_name" value="[value fname]">
[/else]
[/if]
[if ! value lname]
<INPUT TYPE=hidden NAME="last_name" value="[value b_lname]">
[else]
<INPUT TYPE=hidden NAME="last_name" value="[value lname]">
[/else]
[/if]
[if ! value address1]
<INPUT TYPE=hidden NAME="address1" value="[value b_address1]">
[else]
<INPUT TYPE=hidden NAME="address1" value="[value address1]">
[/else]
[/if]
[if ! value address2]
<INPUT TYPE=hidden NAME="address2" value="[value b_address2]">
[else]
<INPUT TYPE=hidden NAME="address2" value="[value address2]">
[/else]
[/if]
[if ! value city]
<INPUT TYPE=hidden NAME="city" value="[value b_city]">
[else]
<INPUT TYPE=hidden NAME="city" value="[value city]">
[/else]
[/if]
[if ! value state]
<INPUT TYPE=hidden NAME="state" value="[value b_state]">
[else]
<INPUT TYPE=hidden NAME="state" value="[value state]">
[/else]
[/if]
[if ! value country]
<INPUT TYPE=hidden NAME="country" value="[value b_country]">
[else]
<INPUT TYPE=hidden NAME="country" value="[value country]">
[/else]
[/if]
[if ! value zip]
<INPUT TYPE=hidden NAME="zip" value="[value b_zip]">
[else]
<INPUT TYPE=hidden NAME="zip" value="[value zip]">
[/else]
[/if]
<INPUT TYPE=hidden NAME="night_phone_a" value="[scratch night_phone_a]">
<INPUT TYPE=hidden NAME="night_phone_b" value="[scratch night_phone_b]">
<INPUT TYPE=hidden NAME="night_phone_c" value="[scratch night_phone_c]">
<INPUT TYPE=hidden NAME="day_phone_a" value="[scratch day_phone_a]">
<INPUT TYPE=hidden NAME="day_phone_b" value="[scratch day_phone_b]">
<INPUT TYPE=hidden NAME="day_phone_c" value="[scratch day_phone_c]">
<INPUT TYPE=hidden NAME="email" value="[value email]">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="image"
src="https://www.goldissue.com/images/foundation/click_here_to_pay.gif"
border="0" name="submit" alt="Make payments with PayPal - it's fast,
free and secure!">
<input type="hidden" name="item_name" value="[perl
no_return=0]$Scratch->{ourbasket}[/perl]">
</form>
[/seti]
[/if]
<br>
<center><table width="400"><tr><td>
<center>
<TABLE width="100%">

[if value mv_order_profile eq paypal]
<tr valign=top>
   <td align="right" class="contentbar2apollo">
   <font color=red>NOTICE:</font>
   </td>
   <td class="contentbar1apollo">
   <font color=red>Your purchase is not yet complete and will be<br>
                   shipped after only after you complete your PayPal<br>
                   payment and it's approved.  Click the button below<br>
                   to continue with your PayPal payment<br>
                   </font><p>
                   [scratch paypal_button]
   </td>
</tr>
<table></center>
[/if]



<br>
<center>
<TABLE border="0" width="100%">
<tr>
    <td align="right" class="contentbar2apollo">
    [L]ORDER NUMBER[/L]
    </td>
    <td class="contentbar1apollo">
    [value mv_order_number]
    </td>
</tr>
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Name[/L]
    </td>
    <td class="contentbar1apollo">
    [value fname] [value lname]
    </td>
</tr>
[if value company]
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Company[/L]
    </td>
    <td class="contentbar1apollo">
    [value company]
    </td>
</tr>
[/if]
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Email Address[/L]
    </td>
    <td class="contentbar1apollo">
    [value email]
    </td>
</tr>
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Address[/L]
    </td>
    <td class="contentbar1apollo">
    [value address1]
    </td>
</tr>
[if value address2]
<tr>
    <td align="right" class="contentbar2apollo">
        &nbsp;
    </td>
    <td class="contentbar1apollo">
    [value address2]
    </td>
</tr>
[/if]
<tr>
    <td align="right" class="contentbar2apollo">
        [L]City[/L], [L]State[/L], [L]Zip[/L]
    </td>
    <td class="contentbar1apollo">
    [value city], [value state]  [value zip]
    </td>
</tr>
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Country[/L]
    </td>
    <td class="contentbar1apollo">
    [value country]
    </td>
</tr>
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Payment Method[/L]
    </td>
    <td class="contentbar1apollo">
    [value mv_payment]
    </td>
</tr>
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Shipping Method[/L]
    </td>
    <td class="contentbar1apollo">
    [shipping_desc]
    </td>
</tr>
[if value mv_handling]
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Handling Charge[/L]
    </td>
    <td class="contentbar1apollo">
    [loop list="[value mv_handling]"]
    [loop-change 1]
        [condition]1[/condition]
        [else]<BR>[/else]
    [/loop-change 1]
    [either][shipping_desc mode="[loop-code]"][or][L]CHARGED[/L][/either]
    [/loop]
    </td>
</tr>
[/if]
[if value phone_day]
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Daytime Phone[/L]
    </td>
    <td class="contentbar1apollo">
    [value phone_day]
    </td>
</tr>
[/if]
[if value phone_night]
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Evening Phone[/L]
    </td>
    <td class="contentbar1apollo">
    [value phone_night]
    </td>
</tr>
[/if]
[if value b_fname]
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Billing Name[/L]
    </td>
    <td class="contentbar1apollo">
    [value b_fname] [value b_lname]
    </td>
</tr>
[/if]
[if value b_address1]
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Billing Address[/L]
    </td>
    <td class="contentbar1apollo">
    [value b_address1]
    </td>
</tr>
[if value b_address2]
<tr>
    <td align="right" class="contentbar2apollo">
        &nbsp;
    </td>
    <td class="contentbar1apollo">
    [value b_address2]
    </td>
</tr>
[/if]
<tr>
    <td align="right" class="contentbar2apollo">
        [L]City[/L], [L]State[/L], [L]Zip[/L]
    </td>
    <td class="contentbar1apollo">
    [value b_city], [value b_state]  [value b_zip]
    </td>
</tr>
[/if]
[if value b_country]
<tr>
    <td align="right" class="contentbar2apollo">
        [L]Billing Country[/L]
    </td>
    <td class="contentbar1apollo">
    [value b_country]
    </td>
</tr>
[/if]

</TABLE></center>

<p>

[comment] Handle downloadables [/comment]
[perl products]
    sub get_download {
        if (! $Scratch->{download_present}) {
            return '(<B>Must pay by credit card to download now.)</B>';
        }
        my $sku = shift;
        return '' unless tag_data('products', 'download', $sku);
        my $loc =  tag_data('products', 'dl_location', $sku);
        my $save = delete $Scratch->{mv_add_dot_html};
        my $url = $Tag->area( {
                        href => "deliver/$loc",
                        arg => $sku,
                        form => $Scratch->{mv_autocreate},
                    } );
        $Scratch->{mv_add_dot_html} = $save if $save;
        return qq{<BR><A HREF="$url"><IMG border=0 SRC="download.png"></A>};
    }
    return;
[/perl]
</p>
<TABLE width="100%">
<td align="right" class="contentbar2apollo">[L]Quan[/L]</td>
<td class="contentbar1apollo">[L]Item No.[/L]</td>
<td class="contentbar1apollo">[L]Description[/L]</td>   
<td align="right" class="contentbar2apollo">[L]Price[/L]</td>   
<td align="right" class="contentbar2apollo">[L]Extension[/L]</td>   
[item-list modular=1]
<tr>
    <td align="right" class="contentbar2apollo" valign=top>
    [item-quantity]
    </td>
    <td valign="top" class="contentbar2apollo">
        [item-sku]
    </td>
    <td class="contentbar1apollo">
    [item-data products description]
    [if-modifier size]<BR>[L]SIZE[/L]-->[item-modifier
size][/if-modifier][if-modifier color] [L]COLOR[/L]-->[item-modifier
color][/if-modifier]
    [table-organize cols=4 table=' ' font="size=1" pretty=1]
        [item-options td=1 label=1 bold=1 price=1 type=display]
    [/table-organize]

    [if-item-field download]
        <br>[calc]get_download('[item-code]')[/calc]
    [/if-item-field]
    [if-item-modifier mv_ad]
    <BR>
    <tt><b>[L]SHIP TO:[/L]</B></tt>
    <PRE>[item-modifier mv_ad]</pre>
    [/if-item-modifier]
    </td>
    <td class="contentbar2apollo" align=right valign=top>
        [item-discount-price]
    </td>
    <td class="contentbar2apollo" align=right valign=top>
        [item-discount-subtotal]
    </td>
[/item-list]
<tr>
    <td colspan=3 class="contentbar2apollo">
        &nbsp;
    </td>
    <td class="contentbar1apollo">
        [L]SUBTOTAL[/L]
    </td>
    <td align="right" class="contentbar2apollo">
        [subtotal]
    </td>
</tr>
<tr>
    <td colspan="3" class="contentbar2apollo">
        &nbsp;
    </td>
    <td class="contentbar1apollo">
        [L]SALES TAX[/L]
    </td>
    <td align="right" class="contentbar2apollo">
        [salestax]
    </td>
</tr>
[if value mv_shipmode]
<tr>
    <td colspan="3" class="contentbar2apollo">
        &nbsp;
    </td>
    <td class="contentbar1apollo">
        [L]SHIPPING[/L]
    </td>
    <td align="right" class="contentbar2apollo">
        [shipping]
    </td>
</tr>
[/if]
[if value mv_handling]
<tr>
    <td colspan="3" class="contentbar2apollo">
        &nbsp;
    </td>
    <td class="contentbar1apollo">
        [L]HANDLING[/L]
    </td>
    <td align="right" class="contentbar2apollo">
        [handling]
    </td>
</tr>
[/if]
<tr>
    <td colspan="3" class="contentbar2apollo">
        &nbsp;
    </td>
    <td class="contentbar1apollo">
        [L]ORDER TOTAL[/L]
    </td>
    <td align="right" class="contentbar2apollo">
        [total-cost]
    </td>
</tr>
[if value gift_note]
<tr>
    <td colspan=2>
    <B>[L]Comments/Note for Gift:[/L]</B>
    </td>
    <td colspan="3" class="contentbar2apollo">
    <PRE>
    [value gift_note]
    </PRE>
    </td>
</tr>
[/if]
</table>
</td><tr></table</center>
<papollo>
</i>(Please print this receipt for your records. Thank you for your
order!)</i>
</papollo>

[include templates/components/specials]
</CENTER>

<!-- END CONTENT -->

@_NOLEFT_BOTTOM_APOLLO_@


More information about the interchange-users mailing list