girish_327
Posts: 108
|
| Posted: 02/14/2008, 6:14 AM |
|
Hello All,
I am facing one problem currently with CCS. I have record form with some fields and I would like to insert that values to database and then I want to post that values to paypal website but using redirect it does not post the values to external page.
Please HELP me how do I insert a new record and post the values to paypal site.
Thank you
_________________
Girish Baraskar
Web Designer/Developer
http://www.agnisdesigners.com
http://www.eindianpaintings.com
http://www.realestatekolhapur.com |
 |
 |
Gary Finlay
|
| Posted: 02/14/2008, 7:08 AM |
|
Have a look here....
https://www.paypal.com/us/cgi-bin/webscr?cmd=_pdn_xclick_techview_outside
Essentially you create a form with hidden fields on it and submit this form
to Paypal.
The Paypal "Pay now" button becomes your "Submit" button for the form.
HTH
|
|
|
 |
girish_327
Posts: 108
|
| Posted: 02/14/2008, 7:26 AM |
|
Hi Gary,
Thank you but How do I save my form values in to database.
_________________
Girish Baraskar
Web Designer/Developer
http://www.agnisdesigners.com
http://www.eindianpaintings.com
http://www.realestatekolhapur.com |
 |
 |
jjrjr1
Posts: 942
|
| Posted: 02/16/2008, 4:52 PM |
|
Hi
You can do it like this... Place this type of code in the appropriate place to update your database. Be sure you create a new instance of your database as $db or $securitydb.
$fields = array(
array("Name" => "vou_date", "DataType" => ccsDate, "Value" => CCFormatDate(time(), $db->DateFormat)),
array("Name" => "vou_tranlog", "DataType" => ccsText, "Value" => CCT_VariablesDump(true)),
array("Name" => "vou_total", "DataType" => ccsFloat, "Value" => $MainPage->Attributes->GetValue("pp_mc_gross")),
// array("Name" => "vou_dummykey", "DataType" => ccsInteger, "Value" => $MainPage->Attributes->GetValue("pp_user_id")),
array("Name" => "vou_transkey", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_txn_id")),
array("Name" => "vou_transtatus", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_payment_status")),
array("Name" => "vou_clname", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_last_name")),
array("Name" => "vou_cname", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_first_name")),
array("Name" => "vou_caddr", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_address")),
array("Name" => "vou_cphone", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_contact_phone")),
array("Name" => "vou_street", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_address_street")),
array("Name" => "vou_city", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_address_city")),
array("Name" => "vou_state", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_address_state")),
array("Name" => "vou_zip", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_address_zip")),
array("Name" => "vou_country", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_address_country")),
array("Name" => "vou_cmail", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_payer_email")),
//array("Name" => "vou_dummykey", "DataType" => ccsText, "Value" => $MainPage->Attributes->GetValue("pp_password")),
array("Name" => "vou_idkey", "DataType" => ccsText, "Value" => $idkey),
array("Name" => "vou_valid", "DataType" => ccsInteger, "Value" => 2),
array("Name" => "vou_locked", "DataType" => ccsInteger, "Value" => 1),
array("Name" => "vou_type", "DataType" => ccsInteger, "Value" => 0),
array("Name" => "vou_paypalreceipt", "DataType" => ccsText, "Value" => $receiptid),
array("Name" => "vou_bulkkey", "DataType" => ccsText, "Value" => 0),
array("Name" => "vou_ip", "DataType" => ccsText, "Value" => $ipaddr),
array("Name" => "vou_bulkqyt", "DataType" => ccsText, "Value" => 0),
array("Name" => "vou_source", "DataType" => ccsInteger, "Value" => 1)
);
$sql = CCBuildInsert("mg_voucher", $fields, $securityDb);
$securityDb->query($sql);
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
girish_327
Posts: 108
|
| Posted: 02/16/2008, 8:55 PM |
|
Hello John,
I am little confused with your suggested code. I couldn't understood the way you did the program trick
below is my database structure where I would like to insert the data then may be i I understood the trick.
CREATE TABLE `member` (
`member_id` int(10) NOT NULL auto_increment,
`name` varchar(250) NOT NULL default '',
`company` varchar(250) NOT NULL default '',
`title` varchar(50) NOT NULL default '',
`mailing_address` tinytext NOT NULL,
`billing_address` tinytext NOT NULL,
`phone` varchar(50) NOT NULL default '',
`fax` varchar(50) NOT NULL default '',
`email` varchar(250) NOT NULL default '',
`start_date` date NOT NULL default '0000-00-00',
`expiry_date` date NOT NULL default '0000-00-00',
`subscription` int(10) NOT NULL default '0',
`login` varchar(20) NOT NULL default '',
`password` varchar(20) NOT NULL default '',
`group_id` tinyint(4) NOT NULL default '0',
`paid` tinyint(4) default '0',
`transaction_id` int(15) default NULL,
`tempID` varchar(10) NOT NULL,
PRIMARY KEY (`member_id`)
) ;
Thank you
Girish
_________________
Girish Baraskar
Web Designer/Developer
http://www.agnisdesigners.com
http://www.eindianpaintings.com
http://www.realestatekolhapur.com |
 |
 |
|