IDEAL installation in Photo Shop IDEAL installation in Photo Shop
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

IDEAL installation in Photo Shop

Started by StudioLahaye, June 12, 2009, 01:22:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

StudioLahaye

I'm quite a beginner but i managed to install and configure the shop according to my own specs.

I'm trying to implement IDeal payment (paypal alike procedure).
I recieved the (php) code from my bank with instructions.

plain said it tells me to find the syntax that produces the final price, insert an bank ID for verification and paste the code into the source.

easier said then done for me..
Can someone please help me a little more, i can't find the php code that outputs the total price and I don't know where to install the code (hense where to place the IDeal form and submission button).

Any help is appreciated.

As I don't have the code digital now I will post this later.
link = www.fotoyvon.nl/bestellingen (dutch website that needs an active account to order, albums are protected from visitors)

StudioLahaye

#1
This is the code as delivered by my bank:




Take the following steps to place the ABN AMRO iDEAL Easy advanced paybutton in your webpage:



Copy/paste the code from CODE_START to CODE_END into your webpage.


Replace 123 (in: var Amount = 123;) by the amount of the payment (dynamically). IMPORTANT: if the amount contains decimals, you have to use '.' (dot) and not ',' (comma) as separator.


Replace TESTiDEALEASY (in: var PSPID = "TESTiDEALEASY";) by the PSPID you receive from ABNAMRO.


Replace Beschrijving (in: var COM ="Beschrijving";) by your order description.


It is possible that you receive an error. At chapter 4 you can find the explanation of the error.





<!-- CODE_START -->



<script type="text/javascript">



var Amount = 123;

var PSPID = "TESTiDEALEASY";              

var COM = "Beschrijving";

var AM;



if (isNaN(Amount))

             {

                           alert("Amount not a number: " + Amount + " !");

                           AM = ""

             }

else

             {

                           AM = Math.round(parseFloat(Amount)*100);

             }



<!-- Begin

var orderID = "1";

mydate = new Date();

tv = mydate.getYear() % 10;

orderID = orderID + tv;

tv = (mydate.getMonth() * 31) + mydate.getDate();

orderID = orderID + ((tv < 10) ? '0' : '') + ((tv < 100) ? '0' : '') + tv;

tv = (mydate.getHours() * 3600) + (mydate.getMinutes() * 60) + mydate.getSeconds();

orderID = orderID + ((tv < 10) ? '0' : '') + ((tv < 100) ? '0' : '') + ((tv < 1000) ? '0' : '') + ((tv < 10000) ? '0' : '') + tv;

tvplus = Math.round(Math.random() * 9);

// End -->



var Cn=new Array(

"AFGHANISTAN","ALBANIE","ALGERIJE","ANDORRA","ANGOLA","ANGUILLA","ANTARTICA","ANTIGUA EN B.","ARGENTINIE","ARMENIE","ARUBA","AUSTRALIE","AZERBEIDJAN","BAHAMAS","BAHREIN","BANGLADESH","BARBADOS","BELARUS","BELGIE","BELIZE","BENIN","BERMUDA","BHUTAN","BOLIVIA","BOSNIA HERZEGOWINA","BOTSWANA","BOUVET","BRAZILIE","BRITSE O. GEB.","BRUNEI","BULGARIJE","BURKINA FASO","BURUNDI","CABO VERDE","CAMBODJA","CANADA","CAYMAN","CENTRAALAFRIKA","CHILI","CHINA","CHRISTMAS","COCOS","COLUMBIA","COMOROS","CONGO (REP.DEM.)","COOK","COSTA RICA","CROATIE","CUBA","CYPRUS","DENEMARKEN","DJIBOUTI","DOMINICA","DOMINICAANSE R.","DUITSLAND","ECUADOR","EGYPTE","ERITREA","ESTLAND","ETHIOPIE","FAEROER","FALKLANDS","FIJI","FILIPPIJNEN","FINLAND","France, METROPOL.","FRANKRIJK","FRANS GUYANA","FRENCH SOUTH.TER.","GABON","GAMBIA","GEORGIE","GHANA","GIBRALTAR","GRENADA","GRIEKENLAND","GROENLAND","GUADELOUPE","GUAM","GUATEMALA","GUINEA EQ.","GUINEA-BISSAU","GUINEE","GUYANA","HAITI","HEARD MC D.","HONDURAS","HONG-KONG","HONGARIJE","IERLAND","IJSLAND","INDIA","INDONESIE","IRAK","IRAN","ISRAEL","ITALIE","IVOORKUST","JAMAICA","JAPAN","JEMEN","JOEGOSLAVIE","JORDANIE","KAMEROEN","KAZACHSTAN","KENYA","KIRGIZSTAN","KIRIBATI","KOEWEIT","KONGO (BRAZA.)","LAOS","LESOTHO","LETLAND","LIBANON","LIBERIA","LIBIE","LIECHTENSTEIN","LITOUWEN","LUXEMBURG","MACAO","MACEDONIE","MADAGASCAR","MALAWI","MALEDIVEN","MALEISIE","MALI","MALTA","MARIANNEN","MAROKKO","MARSHALL","MARTINIQUE","MAURITANIE","MAURITIUS","MAYOTTE","MEXICO","MICRONESIE","MINOR OUTLYING ISL.","MOLDAVIE","MONACO","MONGOLIE","MONTSERRAT","MOZAMBIQUE","MYANMAR","N. CALEDONIE","NAMIBIE","NAURU","NED. ANTIL.","NEDERLAND","NEPAL","NEW ZEALAND","NICARAGUA","NIGER","NIGERIA","NIUE","NOORD-KOREA","NOORWEGEN","NORFOLK EILAND","OEKRAINE","OEZBEKISTAN","OMAN","OOST TIMOR","OOSTENRIJK","PAKISTAN","PALAO","PALEST. TERRIT. (OCC.)","PANAMA","PAPUA-N. G.","PARAGUAY","PERU","PITCAIRN","POLEN","POLYNESIE (F)","PORTUGAL","PUERTO RICO","QATAR","REUNION","ROEMENIE","RUSLAND","RWANDA","SAINT PIERRE -M.","SALVADOR (EL)","SAMOA","SAMOA (US)","SAN MARINO","SAO TOME EN P.","SAOEDI-ARABIE","SENEGAL","SERBIA MONTENEGRO","SEYCHELLEN","SIERRA LEONE","SINGAPORE","SINT HELENA","SINT LUCIA","SLOVENIE","SLOWAKIJE","SOEDAN","SOLOMON","SOMALIA","SOUTH GEORGIA","SPANJE","SRI LANKA","ST KITTS - N.","ST VINCENT-G.","SURINAME","SVALBARD","SWAZILAND","SYRIE","TADJIKISTAN","TAIWAN","TANZANIA","THAILAND","TOGO","TOKELAU","TONGA","TRINIDAD EN T.","TSJAAD","TSJECHIE","TUNESIE","TURKIJE","TURKMENISTAN","TURKS EN CAICOS","TUVALU","UGANDA","UNITED KINGDOM","URUGUAY","USA","V. A. EMIR.","VANUATU","VATICAANSTAD","VENEZUELA","VIETNAM","VIRGIN (GB)","VIRGIN (USA)","WALLIS EN F.","WESTERN SAHARA","ZAMBIA","ZIMBABWE","ZUID-AFRIKA","ZUID-KOREA","ZWEDEN","ZWITSERLAND"

)

var Cc=new Array(

"AF","AL","DZ","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","CV","KH","CA","KY","CF","CL","CN","CX","CC","CO","KM","CD","CK","CR","HR","CU","CY","DK","DJ","DM","DO","DE","EC","EG","ER","EE","ET","FO","FK","FJ","PH","FI","FX","FR","GF","TF","GA","GM","GE","GH","GI","GD","GR","GL","GP","GU","GT","GQ","GW","GN","GY","HT","HM","HN","HK","HU","IE","IS","IN","ID","IQ","IR","IL","IT","CI","JM","JP","YE","YU","JO","CM","KZ","KE","KG","KI","KW","CG","LA","LS","LV","LB","LR","LY","LI","LT","LU","MO","MK","MG","MW","MV","MY","ML","MT","MP","MA","MH","MQ","MR","MU","YT","MX","FM","UM","MD","MC","MN","MS","MZ","MM","NC","NA","NR","AN","NL","NP","NZ","NI","NE","NG","NU","KP","NO","NF","UA","UZ","OM","TP","AT","PK","PW","PS","PA","PG","PY","PE","PN","PL","PF","PT","PR","QA","RE","RO","RU","RW","PM","SV","WS","AS","SM","ST","SA","SN","CS","SC","SL","SG","SH","LC","SI","SK","SD","SB","SO","GS","ES","LK","KN","VC","SR","SJ","SZ","SY","TJ","TW","TZ","TH","TG","TK","TO","TT","TD","CZ","TN","TR","TM","TC","TV","UG","GB","UY","US","AE","VU","VA","VE","VN","VG","VI","WF","EH","ZM","ZW","ZA","KR","SE","CH"

)

var NC=Cn.length;





</script>

<style type="text/css">

             label {width: 120px; text-align: left;}

             button.iDEALeasy {background-color: #FFFFFF;}

</style>







<form method="post" action="https://internetkassa.abnamro.nl/ncol/prod/orderstandard.asp" id="form1" name="form1">

<script type="text/javascript">

             <!--

                           document.write("<input type=\"hidden\" NAME=\"PSPID\" value=\"" + PSPID + "\" />");

                           document.write("<input type=\"hidden\" NAME=\"orderID\" value=\"" + (orderID + ((tvplus + 1) % 10)) + "\" />");

                           document.write("<input type=\"hidden\" NAME=\"amount\" value=\"" + AM + "\" />");

                           document.write("<input type=\"hidden\" NAME=\"COM\" value=\"" + COM + "\" />");

             //-->

</script>

<input type="hidden" name="currency" value="EUR" />

<input type="hidden" name="language" value="NL_NL" />

<input type="hidden" name="PM" value="iDEAL" />



<!-- Those optional fields may be filled by the buyer or the the field type="text" may be

changed to type="hidden" and the argument value="" filled by the merchant.-->



<br />

<label for="CN">Naam</label>

<input type="text" name="CN" value="" maxlength="35" />

<br />

<label for="EMAIL">email</label>

<input type="text" name="EMAIL" value="" maxlength="50" />

<br />

<label for="owneraddress">Adres</label>

<input type="text" name="owneraddress" value="" maxlength="255" />

<br />

<label for="ownertown">Stad</label>

<input type="text" name="ownertown" value="" maxlength="25" />

<br />

<label for="ownerzip">Postcode</label>

<input type="text" name="ownerzip" value="" maxlength="10" />

<br />



<label for="ownercty">Land</label>

<script type="text/javascript">

             <!--

             document.write ("<select name=\"ownercty\" >");

                           document.write("<option value=\"\">Selecteer uit de lijst...</option>")

                           for (i=0;i<NC;i++)

             {

                           document.write("<option value="+Cc[i]+">"+Cn[i]+"</option>")

             }

             document.write ("</select>");

             //-->

</script>              

<br />

<!-- end of optional fields -->

<!-- Submit button -->

<button class="iDEALeasy" type="submit" name="submit1" value="submit">

             Betalen met<br />

<img src="https://internetkassa.abnamro.nl/images/iDEAL_easy.gif" alt="iDEAL"  />

</button>



</form>



<!-- CODE_END -->


Joachim Müller

Looks like your request is way beyond the scope of free support.
Double posting: http://forum.coppermine-gallery.net/index.php/topic,57206.msg297042.html#msg297042
Use the [ c o d e ] tags in the future - I edited your posting accordingly.

StudioLahaye

sorry for dubbel post.

the only question is, where do i place the code, is that in checkout or somewhere else?
The thing is, if I place the code where I think it is good, the image imbedded in the code does not show and the form is placed on the most strangest of places...

I think It's rather simple matter for someone with good understanding of PHP.

Joachim Müller

Quote from: StudioLahaye on June 13, 2009, 09:10:18 AM
the only question is, where do i place the code, is that in checkout or somewhere else?
Nowhere. You can't just paste that in somewhere and hope that things will start working miraculously.
The mod hasn't been designed to work with your method of payment. You may be able to accomplish payment with your bank, but that would require change in the mod. You can't just post some code snippets - you need to have an API to accomplish what you're up to and of course good coding skills. If you're not a coder, you won't be able to do that. That's why I said: beyond what you can expect from free support - you'd need a coder to get this working. I can tell that you're not a coder because you would have asked the question in a different way if you were a coder.
Quote from: StudioLahaye on June 13, 2009, 09:10:18 AMI think It's rather simple matter for someone with good understanding of PHP.
Really? You must be a coder to be able to judge. Since you're not: don't post such preposterous assumptions.

Stramm

I've described how to add new billing solutions here
http://forum.coppermine-gallery.net/index.php/topic,57206.msg293737.html#msg293737 (read from here on)
But I'm afraid you'll need some coding knowledge to get it going.


StudioLahaye

In that case you can close the post.

Althought you could be a little more understanding I thank you for your replies.
The manual provided by my bank gives a beginner the idea it's rather simple; Not knowing that the complete plugin must be rewritten.

Not being a coder also means I do not know where the "free support scope" reaches, otherwise I wouldn't request what I requested..
If you elaborated your first reply about the free support I would have known and not ask again.

Again thanks and remember everybody has it's specialty.

StudioLahaye

Quote from: Stramm on June 13, 2009, 04:15:19 PM
I've described how to add new billing solutions here
http://forum.coppermine-gallery.net/index.php/topic,57206.msg293737.html#msg293737 (read from here on)
But I'm afraid you'll need some coding knowledge to get it going.




Thank you, I may not be a coder but i'm neither a quitter and i'll give it a shot.

phill104

If you do not get success and are willing to pay someone to code this for you then detail your request in the section below.

http://forum.coppermine-gallery.net/index.php/board,30.0.html
It is a mistake to think you can solve any major problems just with potatoes.