Raiak
06-19-2002, 01:50 PM
Ok, I need some users assistance. As I stated in my previous thread, I have completely recoded the whole of the main code from scratch. In doing this, I have removed all the swreg billing code, and placed it into a new php file.
This file creates a secure socket connection to the SWReg server, which it then passes the order request, then receives the response, Accepted, Declined etc. 100% Anonymous to your users, all they see in your html output is the call to the PHP file which does all the work, at the server level.
Due to this (moving the Swreg billing code to a new file) I am able to create additional files, for other billing merchants. Say, 2checkout, propay etc. Allowing the Recurring billing scripts to be used by others, other than just SWReg users.
I need to know how other services handle transactions. SWReg passes the url in the form of /cgi-bin/c.cgi?shopid=%shopid%&productis etc etc. If you would like to see your gateway supported, then please leave your feedback.
Andy.
The Prohacker
06-19-2002, 02:15 PM
Shopping Cart Payment Routine Specifications
This page covers the specifications for the cart payment routine on the 2Checkout.com system. It is provided for clients that want to use their own shopping cart or other specialized program and have sufficient knowledge to code the procedures. If you have the 2Checkout.com free shopping cart you do not need to concern yourself with this specification, it is handled automatically.
Payment Routine: https://www.2checkout.com/cgi-bin/sbuyers/cartpurchase.2c
The following parameters must be passed from your shopping cart or other program to cartpurchase.2c.
Note: This routine also accept in authorize.net parameters ( see below ), and linkpt parameters.
sid - your 2Checkout.com account number
total - total amount to be billed (in decimal form with no dollar sign)
cart_order_id - unique order id from your cart or other program
demo - set to Y for testing or set the cart routine to demo mode here.
DO NOT PASS DEMO IN OR LEAVE IT BLANK FOR LIVE PROCESSING.
Example:
https://www.2checkout.com/cgi-bin/sbuyers/cartpurchase.2c?sid=124&total=23.00&cart_order_id=1234567
The following parameters can be passed in and will be passed back to your routine. Optionally a confirmation email with your order number and ours will be sent to you and the buyer when the credit card transaction is approved.
order_number - 2Checkout.com order number
card_holder_name - Card holders name
street_address - Card holders address
city- Card holders address
state - Card holders address
zip - Card holders address
country - Card holders address
email - Card holders email
phone- Card holders phone number
cart_order_id - Your order number passed back
cart_id - Your order number passed back (same as cart_order_id)
credit_card_processed - "Y" if successful
total - Total billed to credit card after handling charges if any
ship_name - Shipping Info
ship_street_address - Shipping Info
ship_city - Shipping Info
ship_state - Shipping Info
ship_zip - Shipping Info
ship_country - Shipping Info
Make sure and set up your Cart/Program Details in our database.
If you wish to take down a separate shipping and billing address you must indicate it here Shipping Details.
Shopping Cart Payment Routine Specifications (Authorize.net)
In addition the above routine, the following routine will ALSO accept in Authorize.net parameters.
https://www.2checkout.com/cgi-bin/Abuyers/purchase.2c
In most cases just find in the shopping cart ( maybe in a code file ) the authorize.net payment url
https://secure.authorize.net/gateway/transact.dll
and change it to
https://www.2checkout.com/cgi-bin/Abuyers/purchase.2c
Then just set everything else up as if you had an authorize.net account.
The parameters that should be passed into the ./Abuyers/purchase.2c routine are as follows:
x_login - 2Checkout.com Seller id
x_amount - Amount to bill.
x_invoice_num - Order number from your system
The payment routine will ask for the following buyers information if you do not send it in
x_First_Name
x_Last_Name
x_Phone
x_Email
x_Address
x_City
x_State
x_Zip
x_Country
x_Exp_Date
x_Card_Num - You must have an SSL server to send the credit card # in. If you do not, a warning will be printed letting the buyer know that their credit card number was transmitted over and insecure channel.
Other Optional Parameters Accepted:
x_Ship_To_First_Name
x_Ship_To_Last_Name
x_Ship_To_Address
x_Ship_To_City
x_Ship_To_State
x_Ship_To_Zip
x_Ship_To_Country
You can set up this payment routine to do an HTML post back to your shopping cart after the payment by setting the return here - Cart/Program Details.
Note: Any parameters sent into the routine will be passed back to your routine after the sale is complete.
Passback:
Payment Routines:
https://www.2checkout.com/cgi-bin/sbuyers/purchase.2c (Example)
https://www.2checkout.com/cgi-bin/ccbuyers/purchase.2c (Example)
The following parameters must be passed from your routine to purchase.2c.
sid - your 2Checkout.com account number
product_id - Product ID of the product/service from the 2Checkout system to be billed. If sending a second product/service to be billed product_id1, third product_id2, etc..
quantity - Quantity of the product/service from the 2Checkout system to be billed. If sending a second product/service to be billed quantity1, third quantity2, etc..
Optional Parameters
merchant_order_id - order id from your system that you would like recorded and passed back.
demo - set to Y for testing or set the purchase button/link routine to demo mode here.
DO NOT PASS DEMO IN OR LEAVE IT BLANK FOR LIVE PROCESSING.
Example of total string:
https://www.2checkout.com/cgi-bin/ccbuyers/purchase.2c?sid=124&product_id=1&quantity=1&merchant_order_id=test1&demo=Y
That should just about cover it for 2CO