[ checkout ] 2CO module

korpdata

Joined: 2006-05-25
Posts: 43
Posted: Tue, 2006-06-20 20:15

Hi, everyone:
I think this module will be usefull for someone. Basically, I copied the checkoutpaypal module and modified it in order to work with 2checkout.
It is a very simple change, but I think someone will say "thanks!".
As the checkoutpaypal module, it needs the checkout module from our friend turnbulm.
I hope I help someone's work.
Sincerely,

Yuei Nakada
consultorianet.com|The Open Source Company

AttachmentSize
checkout2co.zip16.69 KB
 
ryano

Joined: 2004-08-18
Posts: 32
Posted: Thu, 2006-08-17 14:28

Hi,
This is a great module, but I would like to have it appear on the confirm page after the email has been sent by the checkoutemail . I understand the information from the form posted via email would have to be forwarded to the next page, I can not see how to write this with the gallery code as I am not strong with this stuff. If anyone has any ideas or suggestions please respond to this message.

 
mtbkanata

Joined: 2003-02-10
Posts: 8
Posted: Mon, 2006-09-18 15:13

Great module.. I had to change it all to English, and update the form a little... looks like 2Checkout might have changed some of their passback parameters..but it works perfect!

 
ryano

Joined: 2004-08-18
Posts: 32
Posted: Tue, 2006-09-19 06:35

Hi mtbkanata,
Would you be willing to make your version of the module public? if so, can you post it on the forum or pm me with the address for it. I have been playing around with the orginal but not been able to get it to work.
Thank you in advance.

 
korpdata

Joined: 2006-05-25
Posts: 43
Posted: Thu, 2006-09-21 20:13

Hi, mtbkanata:

I'd like also to have that version, in order to figure it out what I did wrong.
:)
thanks.

[ KORPDATA ] Innovando Soluciones Empresariales

 
mtbkanata

Joined: 2003-02-10
Posts: 8
Posted: Tue, 2006-10-03 15:32

Sorry, I didn't get a notification on this one!

For the translations, I just did a Spanish to English Babblefish on anywhere I saw something I didn't understand.

As for the passback, I don't have the orginal anymore, because I've mucked around with the code, but what I found was that this was all I needed to pass to 2Co to make it work. Since all my clients are logged on as Guest, I don't pass any client details:

Quote:
<form action="https://www.2checkout.com/2co/buyer/purchase" method="post">

<input type="hidden" name="sid" value="394583">
<input type="hidden" name="total" value="{$tpl.total}">
<input type="hidden" name="cart_order_id" value="{$payment.paymentVariables.transactionId}">
<input type="hidden" name="c_prod" value="12"> /* This is the most important part, you need a item in 2Co to sell... */
<input type="hidden" name="id_type" value="2">
<input type="hidden" name="Fixed" value="Y">

<input type="submit" class="btn" name="2Checkout" value="Pay With Credit Card"/>

</form>

 
parkiet

Joined: 2006-03-16
Posts: 22
Posted: Tue, 2007-03-27 22:17
mtbkanata wrote:
Sorry, I didn't get a notification on this one!

For the translations, I just did a Spanish to English Babblefish on anywhere I saw something I didn't understand.

As for the passback, I don't have the orginal anymore, because I've mucked around with the code, but what I found was that this was all I needed to pass to 2Co to make it work. Since all my clients are logged on as Guest, I don't pass any client details:

Hallo, mtbkana,

Is it possible to get your translation in English? As I have some trouble with the checkoutpaypal module, I am interested in this one. And I do not understand one word of Spanish.

Thank you in advance

 
korpdata

Joined: 2006-05-25
Posts: 43
Posted: Mon, 2007-04-16 18:19

Sure I could translate it. I am preparing a new version of the module.
[ KORPDATA ] Innovando Soluciones Empresariales

 
enriqueavila

Joined: 2007-05-30
Posts: 19
Posted: Wed, 2007-05-30 18:53

Can you guys please tell me how to configure, install and etc the gallery in order to work with 2checkout.. i already downloaded the module and installed it but I can't figure out how to make it work so ppl can purchase my photographs.
Thank you very much... I will really appreciate it.

 
enriqueavila

Joined: 2007-05-30
Posts: 19
Posted: Wed, 2007-05-30 21:15

Where should I put that code?

 
enriqueavila

Joined: 2007-05-30
Posts: 19
Posted: Thu, 2007-05-31 19:40

Is it possible that someone can create a tutorial on "how to set 2checkout module" to work with gallery... I mean total noobs like me are having a great hard time here.. I don't know what to set on custom fields, or anything......
PLEASE... i'm getting so frustrated with this...
please visit http://www.portstock.com/photostock/gallery2/ so you can realized what could be happening here... I REALLY NEED HELP and no one seems to care in here.

 
enriqueavila

Joined: 2007-05-30
Posts: 19
Posted: Fri, 2007-06-01 17:39

When I get the source code of the page with the purchase link... I get this what do i need to modify and WHERE.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="es-ES">
<head>
<link rel="stylesheet" type="text/css" href="main.php?g2_view=imageframe.CSS&amp;g2_frames=photocorners_small"/>

<title>PortStock::Checkout</title>
<link rel="stylesheet" type="text/css" href="modules/core/data/gallery.css"/>
<link rel="stylesheet" type="text/css" href="modules/icons/iconpacks/silk/icons.css"/>
<script type="text/javascript" src="modules/search/SearchBlock.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="themes/matrix/theme.css"/>
</head>
<body class="gallery">
<div id="gallery" class="IE">
<div id="gsHeader">
<a href="main.php"><img src="images/galleryLogo_sm.gif"
width="107" height="48" alt=""/></a>
</div>
<div id="gsNavBar" class="gcBorder1">
<div class="gbSystemLinks">
<span class="block-core-SystemLink">
<a href="main.php?g2_view=core.SiteAdmin&amp;g2_return=%2Fphotostock%2Fgallery2%2Fmain.php%3Fg2_view%3Dcheckout.ConfirmPhotos%26g2_statusId%3Dxaf307ada%26g2_navId%3Dxfe7bda0a&amp;g2_navId=xfe7bda0a">Administrar Sitio</a>
</span>

<span class="block-core-SystemLink">
<a href="main.php?g2_view=core.UserAdmin&amp;g2_subView=core.UserPreferences&amp;g2_return=%2Fphotostock%2Fgallery2%2Fmain.php%3Fg2_view%3Dcheckout.ConfirmPhotos%26g2_statusId%3Dxaf307ada%26g2_navId%3Dxfe7bda0a&amp;g2_navId=xfe7bda0a">Tu Cuenta</a>
</span>

<span class="block-core-SystemLink">
<a href="main.php?g2_controller=core.Logout&amp;g2_return=%2Fphotostock%2Fgallery2%2Fmain.php%3Fg2_view%3Dcheckout.ConfirmPhotos%26g2_statusId%3Dxaf307ada%26g2_navId%3Dxfe7bda0a&amp;g2_navId=xfe7bda0a&amp;g2_authToken=7c0c355f2cfa">Cerrar Sesión</a>
</span>

</div>
<div class="gbBreadCrumb">
<div class="block-core-BreadCrumb">
<a href="main.php" class="BreadCrumb-1">
Galería</a>
</div>
</div>
</div>
<table width="100%" cellspacing="0" cellpadding="0">
<tr valign="top">
<td id="gsSidebarCol">
<div id="gsSidebar" class="gcBorder1">

<div class="block-search-SearchBlock gbBlock">
<form id="search_SearchBlock" action="main.php" method="post" onsubmit="return search_SearchBlock_checkForm()">
<div>
<input type="hidden" name="g2_returnName" value=""/>
<input type="hidden" name="g2_navId" value="xfe7bda0a"/>
<input type="hidden" name="g2_formUrl" value="/photostock/gallery2/main.php?g2_view=checkout.ConfirmPhotos&amp;g2_statusId=xaf307ada&amp;g2_navId=xfe7bda0a"/>
<input type="hidden" name="g2_authToken" value="7c0c355f2cfa"/>

<input type="hidden" name="g2_view" value="search.SearchScan"/>
<input type="hidden" name="g2_form[formName]" value="search_SearchBlock"/>
<input type="text" id="searchCriteria" size="18"
name="g2_form[searchCriteria]"
value="Buscar en Gallery"
onfocus="search_SearchBlock_focus()"
onblur="search_SearchBlock_blur()"
class="textbox"/>
<input type="hidden" name="g2_form[useDefaultSettings]" value="1" />
</div>
<div>
<a href="main.php?g2_view=search.SearchScan&amp;g2_form%5BuseDefaultSettings%5D=1&amp;g2_return=%2Fphotostock%2Fgallery2%2Fmain.php%3Fg2_view%3Dcheckout.ConfirmPhotos%26g2_statusId%3Dxaf307ada%26g2_navId%3Dxfe7bda0a&amp;g2_navId=xfe7bda0a"
class="gbAdminLink gbLink-search_SearchScan advanced">Búsqueda Avanzada</a>
</div>
</form>
</div>

<div class="block-imageblock-ImageBlock gbBlock">
<div class="one-image">
<h3> Imágen Aleatoria </h3>

<table class="ImageFrame_photocorners_small" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="TL"></td>
<td class="TT"><div class="H"></div></td>
<td class="TR"></td>
</tr>
<tr>
<td class="LL"><div class="V">&nbsp;</div></td>
<td rowspan="1" colspan="1" class="IMG">
<a href="main.php?g2_itemId=305">

<img src="main.php?g2_view=core.DownloadItem&amp;g2_itemId=306&amp;g2_serialNumber=2" width="90" height="120" id="IFid1" class="ImageFrame_image" alt="invitame a chupar" longdesc="birria beer chupa"/>
</a> </td>
<td class="RR"><div class="V">&nbsp;</div></td>
</tr>
<tr>
<td class="BL"></td>
<td class="BB"><div class="H"></div></td>
<td class="BR"></td>
</tr>
</table>

<h4 class="giDescription">
invitame a chupar
</h4>
<p class="giInfo">
<span class="summary">
Fecha: 24/02/07
</span>
<span class="summary">
Visitas: 1
</span>
</p>
</div>
</div>

</div>
</td>
<td>
<div class="gbBlock gcBackground1">
<h2 class="gbTitle">
Checkout::Step 2 - Confirm your selection
</h2>
</div>
<form action="main.php" method="post">
<input type="hidden" name="g2_returnName" value=""/>
<input type="hidden" name="g2_navId" value="xfe7bda0a"/>
<input type="hidden" name="g2_formUrl" value="/photostock/gallery2/main.php?g2_view=checkout.ConfirmPhotos&amp;g2_statusId=xaf307ada&amp;g2_navId=xfe7bda0a"/>
<input type="hidden" name="g2_authToken" value="7c0c355f2cfa"/>

<input type="hidden" name="g2_controller" value="checkout.Confirm"/>
<input type="hidden" name="g2_form[formName]" value=""/>
<table class="gbDataTable">
<tr>
<th>Item</th>
<th>Info</th>
<th>Product/Price/Quantity</th>
<th>Subtotal</th>
</tr>
<div class="gbBlock">
<tr>
<tr class="gbEven">
<td>
<img src="main.php?g2_view=core.DownloadItem&amp;g2_itemId=306&amp;g2_serialNumber=2" width="113" height="150" alt="invitame a chupar" longdesc="birria beer chupa"/>
</td>
<td align="top">
<strong>Title:</strong>
invitame a chupar<br>
<strong>Summary:</strong>
birria beer chupa
</td>
<td>
<table cellspacing="0" cellpadding="10" border="1" bordercolor="#999999">
<tr>
<td><center>royaltyfreephotograph</td>
<td><center>$150</td>
<td><center><b>1</b></td>
</tr>

</table>
</td>
<td align="right"><b>$150.00</b></td>
</tr>

<tr class="gbOdd">
<td colspan="3" align="right">Postage and Packing:</td>
<td align="right"><b>$0</b></td>
</tr>
<tr class="gbEven">
<td colspan="3" align="right"><strong>Total:</strong></td>
<td align="right"><strong>$150.00</strong></td>
</tr>
</tr>
<tr>
<td colspan="5" align="right">
<input type="submit" name="g2_form[action][modify]" value="Modify Order"/>
</td>
</tr>
</div>
</form>
<tr>
<td colspan="4" align="right">
Pago con 2checkout.
</td>
<td align="right">
<form action="https://www.2checkout.com/2co/buyer/purchase" method="post">
<input type="hidden" name="sid" value="1228044" />
<input type="hidden" name="cart_order_id" value="324" />
<input type="hidden" name="total" value="" />
<input type="hidden" name="sh_cost" value="0" />
<input type="hidden" name="tco_currency" value="USD" />
<input type="hidden" name="lang" value="sp" />
<input type="hidden" name="id_type" value="1" />
<input type="hidden" name="fixed" value="Y" />
<input type="hidden" name="pay_method" value="CC" />
<input type="image" src="../logo_2co.gif" name="submit" alt="Ir a 2checkout" />
</form></td>
</tr>
<tr>
<td colspan="4" align="right">
Please click on &quot;Confirmation e-mail&quot; so you can have a receipt of your purchase.
</td>
<td align="right">
<form action="main.php" method="post">
<input type="hidden" name="g2_returnName" value=""/>
<input type="hidden" name="g2_navId" value="xfe7bda0a"/>
<input type="hidden" name="g2_formUrl" value="/photostock/gallery2/main.php?g2_view=checkout.ConfirmPhotos&amp;g2_statusId=xaf307ada&amp;g2_navId=xfe7bda0a"/>
<input type="hidden" name="g2_authToken" value="7c0c355f2cfa"/>

<input type="hidden" name="g2_controller" value="checkoutemail:Email"/>
<input type="hidden" name="g2_form[formName]" value=""/>
<input type="submit" name="g2_form[action][email]" value="Confirmation e-mail"/>
</form></td>
</tr>
</table></td>
</tr>
</table>
<div id="gsFooter">
<a href="javascript:alert('Validació deshabilitada hasta que se configure allowSessionAccess en config.php');"><img src="images/xhtml10.png" alt="Esta página es XHTML 1.0 válido" title="Esta página es XHTML 1.0 válido" style="border-style: none" width="80" height="15"/></a>
<a href="http://gallery.sourceforge.net"><img src="images/gallery.gif" alt="Potenciado por Gallery v2.2.1" title="Potenciado por Gallery v2.2.1" style="border-style: none" width="80" height="15"/></a>
<img src="modules/core/data/g22-double_double.png" alt="G2.2: Doble Doble" title="G2.2: Doble Doble" style="border-style: none" width="80" height="15"/>
<a href="http://gallery.sourceforge.net/donate.php?donate_tag=2.2.1"><img src="modules/core/data/donate.png" alt="Dona al proyecto Gallery" title="Dona al proyecto Gallery" style="border-style: none" width="80" height="15"/></a>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
search_SearchBlock_init('Buscar en Gallery', 'Por favor, introduce en termino a buscar.');
// ]]>
</script>

</body>
</html>

 
enriqueavila

Joined: 2007-05-30
Posts: 19
Posted: Fri, 2007-06-01 19:13

Spoke to the people from 2checkout and this is what they said:
How can I modified that parameter/value

Greetings Enrique,

Thank you for contacting 2Checkout.com. My apologies for any inconveniences you may have experienced.

The reason you are receiving this parameter error is because there is no value specified in the 'total' parameter. I have copied the HTML form directly from your website and pasted it below as an example:

<form action="https://www.2checkout.com/2co/buyer/purchase?demo=Y" method="post">
<input name="sid" value="1228044" type="hidden">

<input name="cart_order_id" value="288" type="hidden">
<input name="total" value="" type="hidden">
<input name="sh_cost" value="0" type="hidden">
<input name="tco_currency" value="USD" type="hidden">
<input name="lang" value="sp" type="hidden">
<input name="id_type" value="1" type="hidden">
<input name="fixed" value="Y" type="hidden">
<input name="pay_method" value="CC" type="hidden">
<input src="../logo_2co.gif" name="submit" alt="Ir a 2checkout" type="image">
</form>

As you can see, there is no value in the 'total' parameter. You will need to make sure that this value gets applied to the 'total' parameter, or you will continue to receive this parameter error. I was able to use the same form on your website to do a test purchase after adding a value to the 'total' parameter. Pasted below for your reference is the form I used to complete a demo sale:

<form action="https://www.2checkout.com/2co/buyer/purchase?demo=Y" method="post">
<input name="sid" value="1228044" type="hidden">

<input name="cart_order_id" value="288" type="hidden">
<input name="total" value="1.00" type="hidden">
<input name="sh_cost" value="0" type="hidden">
<input name="tco_currency" value="USD" type="hidden">
<input name="lang" value="sp" type="hidden">
<input name="id_type" value="1" type="hidden">
<input name="fixed" value="Y" type="hidden">
<input name="pay_method" value="CC" type="hidden">
<input src="../logo_2co.gif" name="submit" alt="Ir a 2checkout" type="image">
</form>

You mentioned that this is a module you installed into your gallery software. Since this module was not developed by 2Checkout, we would be unable to assist you with any specific coding details or changes. If you continue to experience issues with the module, you will need to contact the developers of the module for more assistance. Another option is to contact a web developer so that they can make any necessary modifications to the module.

I hope that I have addressed all of your inquiries and provided a detailed level of support. However, if this is not the information you were seeking or if you require any further assistance, please feel free to reply to this ticket. Your patience and understanding regarding these matters is greatly appreciated.

Thank You,
Simba
2Checkout Product Support

Community -- http://www.2checkout.com/community/
Knowledge Base -- http://support.2co.com/deskpro/faq.php
Documentation -- http://www2.2checkout.com/documentation/

 
dreamscap.es

Joined: 2009-05-28
Posts: 5
Posted: Sun, 2009-05-31 21:44

hi,
i have an error message when i install the 2checkout plugin.

Error (ERROR_STORAGE_FAILURE) : No map or entity description for: checkout2coSID

* in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 1326 (gallerycoreapi::error)
* in modules/core/classes/GalleryStorage.class at line 768 (gallerystorageextras::configurestore)
* in modules/core/classes/GalleryModule.class at line 156 (mysqlstorage::configurestore)
* in modules/core/PluginCallback.inc at line 230 (checkout2comodule::installorupgrade)
* in modules/core/PluginCallback.inc at line 67 (plugincallbackview::handlecallback)
* in main.php at line 450 (plugincallbackview::renderimmediate)
* in main.php at line 104
* in main.php at line 88

how can i fix the problem?
cheers

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Mon, 2009-06-01 07:47

I would pretty-much guarantee this module won't work with current Gallery/checkout installations, it's too old.