Here's the submit_ad_pay_box I've got. It has some k5-specific html
toward the bottom, but I believe it should work with that changed for
your site. I assume renewad_box come with Scoop? I haven't looked at
what's in the base distro for a while.

############################################
# Start submit_ad_pay_box

my $action = $ARGS[0];
my $ad_id = $ARGS[1];

my $q_id = $S->dbh->quote($ad_id);
my ($num, $price);
my $renew_args;

if ($action eq 'renew') {
	$num = $ARGS[2];
	unless ($num) {
		return 'Error! No impression count was submitted.';
	}
	# Get total price
	my ($rv, $sth) = $S->db_select({
		WHAT  => 'ad_types.cpm',
		FROM  => 'ad_info, ad_types',
		WHERE => "ad_info.ad_id = $q_id AND ad_info.ad_tmpl =
ad_types.type_template"
	});
	my ($cpm) = $sth->fetchrow();
	$price = ($num/1000) * $cpm;
	$renew_args=";renew=1;count=$num";
} else {
	my ($rv, $sth) = $S->db_select({
		WHAT => 'purchase_size, purchase_price',
		FROM => 'ad_info',
		WHERE => "ad_id=$q_id"});

	($num, $price) = $sth->fetchrow();
	$sth->finish();
}

$price = sprintf("%1.2f", $price);

my $content = qq{
<table width="75%" border=0 cellpadding=5 cellspacing=0 align="center">
  <tr>
    <td colspan=2>|norm_font|
<p>You are ordering <b>$num impressions</b>, for a total cost of
<b>\$$price</b>.</p>
<p>Ok, now it's time for payment. You can pay with paypal, or by credit
or debit card. Please select a payment type below.</p>
|norm_font_end|</td></tr>
  <tr>
    <td align="center">|norm_font|<a
href="https://www.kuro5hin.org/special/adpay?type=paypal;ad_id=$ad_id$renew_args"><img
src="http://www.kuro5hin.org/images/paypal.gif" border="0" alt="Pay with
Paypal"><br>Pay with Paypal</a>|norm_font_end|</td>
    <td align="center">|norm_font|<a
href="https://www.kuro5hin.org/special/adpay?type=cc;ad_id=$ad_id$renew_args"><img
src="http://www.kuro5hin.org/images/cclogos.gif" width="87" height="27"
border=0 ALT="K5 accepts Visa and MasterCard"><br>Pay with Visa or
Mastercard</a>|norm_font_end|</td>
  </tr>
</table>
};

return { content => $content };

# End submit_ad_pay_box
##################################################


--R

Hulver wrote:
> 
> I've been trying to get renews working on my site, but it looks like the
> box code that comes with scoop is incomplete.
> 
> When you renew an ad, it calls a box called submit_ad_pay_box with lots
> of details about the cost of the ad etc.
> 
> However, the submit_ad_pay_box as distributed with scoop does nothing
> except display a message.
> 
> Does anybody have a working box that I can use? rusty?
> 
> We should add this to the default struct file, and also create a patch
> to update the box.
> 
> --
> http://www.hulver.com/scoop/
> 
> Hulver's site.
> 
>   ------------------------------------------------------------------------
>    Part 1.2Type: application/pgp-signature

-- 
Rusty Foster : rusty at kuro5hin.org : http://www.kuro5hin.org
Please go away often: http://www.hotelchatter.com/

Why is it that when I click on "moderate submissions," 
none of the submissions are ever moderate? 
                                              --epepke