Hi,
Thank you for producing such a wonderful system.
I am trying to add a payment transaction through paypal but am stuck in the process. I have seen a previous similar thread at
http://php.brickhost.com/forums/index.php?topic=2622.0 But my prices are not calculated on time basis but are fixed, based on packages. I have around 7 packages / schemes with 7 different prices. What I have done so far is to edit reservation.class.php, around line 459. I have added the paypal values in a database field and am calling the values from there.
/**
* Prints a message nofiying the user that their reservation was placed
* @param string $verb action word of what kind of reservation process just occcured
* @param array $dates dates that were added or modified. Deletions are not printed.
*/
function print_success($verb, $dates = array()) {
echo '<script language="JavaScript" type="text/javascript">' . "\n"
. 'window.opener.document.location.href = window.opener.document.URL;' . "\n"
. '</script>';
$paypal_id = $row_palID['pal_id'];
$date_text = '';
for ($i = 0; $i < count($dates); $i++) {
$date_text .= Time::formatReservationDate($dates[$i], $this->start) . '<br/>';
}
CmnFns::do_message_box(translate('Your ' . $this->word . ' was successfully ' . $verb . $res['starttime'])
. (($this->type != 'd') ? ' ' . translate('for the follwing dates') . '<br /><br />' : '.')
. $date_text . '<br/><br/>'
. '
<FORM ACTION="https://www.paypal.com/cgi-bin/webscr" target=" mainWindow" onSubmit=" self.close();" METHOD="POST">
<input type="hidden" name="cmd" value="_s-xclick">
<input name="hosted_button_id" type="hidden" value="'. $paypal_id .'">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG_global.gif" border="0" name="submit" alt="">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">'
. '</FORM>'
. 'Your reservation is complete only when the payment is done.'
, 'width: 90%;');
}
Here comes a problem. If I add a physical value at
value="'. $paypal_id .'"
like
value="123456"
the value get passed, but if I use
"'. $paypal_id .'"
the resulting form value is
value=" "
. Can someone help me please
Thanks
Jay