
Thank's
??? - Did you go to my site - or I'm confused (sorry) as to what you mean by that?At this point you have the "standard" demo cart working on your hosting account, to test as you like
Ahhh! Cheers GeorgeNo, I didn't go to your site, what I mean is that once you have FTP'ed the files, "At this point you have the "standard" demo cart working on your hosting account, to test as you like"
True - so I'll take that as a yes George.With most moders FTP clients, it is enough that you drag and drop the "cart" folder from your computer to the root directory of your hosting account, and ALL content is correctly FTP'ed with the correct folder structure.
Code: Select all
<?php
###################################################################################
// PAYSON parametrar
// AgentID - finns under menyn "Mitt konto/Integration" när du är inloggad
$AgentID = '1234';
// MD5-nyckel - finns under menyn "Mitt konto/Integration" när du är inloggad
$Key= '1234abcd-1234-abcd-abc-987654321abcd';
// Beskrivning av vad beställning avser, visas i kundens kontohistorik
$Description = 'Beställning från Ditt butiksnamn';
// Butikens eller webbplatsens e-postadress OBS! Måste vara samma som ditt Payson-konto
$SellerEmail = 'order@dinwebbplats.se';
// Totalsumman för beställningen, hämtas från ditt orderformulär
$payson_totalsumma = $_SESSION['totalsumma'];
// Köparens e-postadress, hämtas från ditt orderformulär
$BuyerEmail = $_SESSION['email'];
// Totalsumman enligt ovan
$Cost = $payson_totalsumma;
// Totalsumma när du testar din Payson-betalning
//$Cost = '5,00';
// Extra kostnader som tex frakt
$ExtraCost = '0,00';
// Bekräftelse-sida som visas när Payson-betalningen genomförts
$OkUrl = 'http://dinwebbplats.se/payson_betalning/payson_betalning_klar.php';
// Error-sida som visas om Payson-betalningen avbrutits (du behöver normalt inte ange något här)
$CancelUrl = 'http://dinwebbplats.se/payson_betalning/error.php';
// Referensnr som kan vara kundID eller annat som identifierar betalningen
// Om du inte anger något här kan du använda kundens e-postadress $BuyerEmail för att identifiera betalningen
$RefNr = $_SESSION['kund_id'];
// Ange 1 för att inte erbjuda paysongarantin eller 2 för att erbjuda paysongaranti
// Läs mer om Paysongarantin här: http://www.payson.se/About/Guarantee/
$GuaranteeOffered = "1";
// MD5-hash beräknas från parametrarna ovan
$MD5string = $SellerEmail . ":" . $Cost . ":" . $ExtraCost . ":" . $OkUrl . ":" . $GuaranteeOffered . $Key;
$MD5Hash = md5($MD5string);
###################################################################################
// PAYSON formulär
// TEST
// <form action="https://www.payson.se/testagent/default.aspx" method="post">
echo'
<form action="https://www.payson.se/merchant/default.aspx" method="post">
<input type="hidden" name="BuyerEmail" value="'.$BuyerEmail.'" />
<input type="hidden" name="AgentID" value="'.$AgentID.'" />
<input type="hidden" name="Description" value="'.$Description.'" />
<input type="hidden" name="SellerEmail" value="'.$SellerEmail.'" />
<input type="hidden" name="Cost" value="'.$Cost.'" />
<input type="hidden" name="ExtraCost" value="'.$ExtraCost.'" />
<input type="hidden" name="OkUrl" value="'.$OkUrl.'" />
<input type="hidden" name="CancelUrl" value="'.$CancelUrl.'" />
<input type="hidden" name="RefNr" value="'.$RefNr.'" />
<input type="hidden" name="MD5" value="'.$MD5Hash.'" />
<input type="hidden" name="GuaranteeOffered" value="'.$GuaranteeOffered.'" />
<input type="submit" value="Klicka här för att betala!" />
<br /><br />
<img src="payson_logo/payson145x42.png" alt="Betala med Payson" />
</form>
';
###################################################################################
?>
OK, i'm not to shore how to implement this. Could i just take value code from the Paypal code and replace the values in the Payson code?Navaldesign wrote:I believe you can implement it yourself, there should be no difficulties.
I can't implement something so specific as a generic solution, as Webshop aims to be a codeless solution, adding this would mean that I should make lots of additions in the Administartion interface.
Code: Select all
// Error-page that appears if the Payson-payment is interrupted (you need not normaly enter anything here)
$CancelUrl = 'http://dinwebbplats.se/payson_betalning/error.php';
// Reference number can be customer id, or anything that identifies the payment
// If you do not specify anything here, you can use the customer's email address $BuyerEmail to identify the payment
$RefNr = $_SESSION['kund_id'];
// Enter 1 for not offering Payson Guarantee or two to offer Payson Guarantee
// Learn more about Payson guarantee here: http://www.payson.se/About/Guarantee/
$GuaranteeOffered = "1";
// MD5-hash calculated from the parameters above
$MD5string = $SellerEmail . ":" . $Cost . ":" . $ExtraCost . ":" . $OkUrl . ":" . $GuaranteeOffered . $Key;
$MD5Hash = md5($MD5string);
Code: Select all
<?php
###################################################################################
// PAYSON parametrar
// AgentID - found under the "My Account / Integration" when you are logged in
$AgentID = '1234';
// MD5-key - found under the "My Account / Integration" when you are logged in
$Key= '1234abcd-1234-abcd-abc-987654321abcd';
// A description of what the order relates to, is shown in the customer's account history
$Description = 'Order from Your store name';
// Store or the site's email address NOTE! Must be the same as your Payson Account
$SellerEmail = 'order@dinwebbplats.se';
// The total of your order, from your order form
$payson_totalsumma = $_SESSION['totalsumma'];
// Buyer's e-mail, from your order form
$BuyerEmail = $_SESSION['email'];
// Grand total from the parameters above
$Cost = $payson_totalsumma;
// Grand total when you test your Payson-payment
//$Cost = '5,00';
// Additional costs such as shipping
$ExtraCost = '0,00';
// The confirmation page that appears when Payson-payment has been made
$OkUrl = 'http://dinwebbplats.se/payson_betalning/payson_betalning_klar.php';
// Error-page that appears on the Payson-payment is interrupted (you need not normaly enter anything here)
$CancelUrl = 'http://dinwebbplats.se/payson_betalning/error.php';
// Reference can be customer id, or anything that identifies the payment
// If you do not specify anything here, you can use the customer's email address $BuyerEmail to identify the payment
$RefNr = $_SESSION['kund_id'];
// Enter 1 for not offering Payson warranty or two to offer Payson Guarantee
// Learn more about this Paysongarantin: http://www.payson.se/About/Guarantee/
$GuaranteeOffered = "1";
// MD5-hash calculated from the parameters above
$MD5string = $SellerEmail . ":" . $Cost . ":" . $ExtraCost . ":" . $OkUrl . ":" . $GuaranteeOffered . $Key;
$MD5Hash = md5($MD5string);
###################################################################################
// PAYSON form
// TEST
// <form action="https://www.payson.se/testagent/default.aspx" method="post">
echo'
<form action="https://www.payson.se/merchant/default.aspx" method="post">
<input type="hidden" name="BuyerEmail" value="'.$BuyerEmail.'" />
<input type="hidden" name="AgentID" value="'.$AgentID.'" />
<input type="hidden" name="Description" value="'.$Description.'" />
<input type="hidden" name="SellerEmail" value="'.$SellerEmail.'" />
<input type="hidden" name="Cost" value="'.$Cost.'" />
<input type="hidden" name="ExtraCost" value="'.$ExtraCost.'" />
<input type="hidden" name="OkUrl" value="'.$OkUrl.'" />
<input type="hidden" name="CancelUrl" value="'.$CancelUrl.'" />
<input type="hidden" name="RefNr" value="'.$RefNr.'" />
<input type="hidden" name="MD5" value="'.$MD5Hash.'" />
<input type="hidden" name="GuaranteeOffered" value="'.$GuaranteeOffered.'" />
<input type="submit" value="click here to pay!" />
<br /><br />
<img src="payson_logo/payson145x42.png" alt="Pay with Payson" />
</form>
';
###################################################################################
?>
Code: Select all
<?php
###################################################################################
// PAYSON parametrar
// AgentID - found under the "My Account / Integration" when you are logged in
$AgentID = '1234';
// MD5-key - found under the "My Account / Integration" when you are logged in
$Key= '1234abcd-1234-abcd-abc-987654321abcd';
// A description of what the order relates to, is shown in the customer's account history
$Description = $dbts_title.' Order '.$orderid;
// Store or the site's email address NOTE! Must be the same as your Payson Account
$SellerEmail = 'order@dinwebbplats.se';
// The total of your order, from your order form
$payson_totalsumma = $_SESSION['nettotal'];
// Buyer's e-mail, from your order form
$BuyerEmail = $_SESSION['email'];
// Grand total from the parameters above
$Cost = $payson_totalsumma;
// Grand total when you test your Payson-payment
//$Cost = '5,00';
// Additional costs such as shipping
$ExtraCost = $_SESSION['shipping1'] + $_SESSION['handling'];
// The confirmation page that appears when Payson-payment has been made
$OkUrl = 'http://dinwebbplats.se/payson_betalning/payson_betalning_klar.php';
// Error-page that appears on the Payson-payment is interrupted (you need not normaly enter anything here)
$CancelUrl = 'http://dinwebbplats.se/payson_betalning/error.php';
// Reference can be customer id, or anything that identifies the payment
// If you do not specify anything here, you can use the customer's email address $BuyerEmail to identify the payment
$RefNr = $orderid;
// Enter 1 for not offering Payson warranty or two to offer Payson Guarantee
// Learn more about this Paysongarantin: http://www.payson.se/About/Guarantee/
$GuaranteeOffered = "1";
// MD5-hash calculated from the parameters above
$MD5string = $SellerEmail . ":" . $Cost . ":" . $ExtraCost . ":" . $OkUrl . ":" . $GuaranteeOffered . $Key;
$MD5Hash = md5($MD5string);
###################################################################################
// PAYSON formulär
// TEST
// <form action="https://www.payson.se/testagent/default.aspx" method="post">
echo'
<form action="https://www.payson.se/merchant/default.aspx" method="post">
<input type="hidden" name="BuyerEmail" value="'.$BuyerEmail.'" />
<input type="hidden" name="AgentID" value="'.$AgentID.'" />
<input type="hidden" name="Description" value="'.$Description.'" />
<input type="hidden" name="SellerEmail" value="'.$SellerEmail.'" />
<input type="hidden" name="Cost" value="'.$Cost.'" />
<input type="hidden" name="ExtraCost" value="'.$ExtraCost.'" />
<input type="hidden" name="OkUrl" value="'.$OkUrl.'" />
<input type="hidden" name="CancelUrl" value="'.$CancelUrl.'" />
<input type="hidden" name="RefNr" value="'.$RefNr.'" />
<input type="hidden" name="MD5" value="'.$MD5Hash.'" />
<input type="hidden" name="GuaranteeOffered" value="'.$GuaranteeOffered.'" />
<input type="submit" value="Klicka här för att betala!" />
<br /><br />
<img src="payson_logo/payson145x42.png" alt="Betala med Payson" />
</form>
';
###################################################################################
?>
Navaldesign wrote:Code: Select all
<?php OK Thank's i'l try this. How to put a a Payson option in the combobox in checkout.php page (the combobox whare the Paypal payment option is) The best would be if i could just add the Payson code/Button in the same page as the Paypal code/Button. Do i just chnage the Combobox Pypal option to ex, Paypal / Payson and then add the Payson code in a second html box in the thankyou.php page? ################################################################################### // PAYSON parametrar // AgentID - found under the "My Account / Integration" when you are logged in $AgentID = '1234'; // MD5-key - found under the "My Account / Integration" when you are logged in $Key= '1234abcd-1234-abcd-abc-987654321abcd'; // A description of what the order relates to, is shown in the customer's account history $Description = $dbts_title.' Order '.$orderid; // Store or the site's email address NOTE! Must be the same as your Payson Account $SellerEmail = 'order@dinwebbplats.se'; // The total of your order, from your order form $payson_totalsumma = $_SESSION['nettotal']; // Buyer's e-mail, from your order form $BuyerEmail = $_SESSION['email']; // Grand total from the parameters above $Cost = $payson_totalsumma; // Grand total when you test your Payson-payment //$Cost = '5,00'; // Additional costs such as shipping $ExtraCost = $_SESSION['shipping1'] + $_SESSION['handling']; // The confirmation page that appears when Payson-payment has been made $OkUrl = 'http://dinwebbplats.se/payson_betalning/payson_betalning_klar.php'; // Error-page that appears on the Payson-payment is interrupted (you need not normaly enter anything here) $CancelUrl = 'http://dinwebbplats.se/payson_betalning/error.php'; // Reference can be customer id, or anything that identifies the payment // If you do not specify anything here, you can use the customer's email address $BuyerEmail to identify the payment $RefNr = $orderid; // Enter 1 for not offering Payson warranty or two to offer Payson Guarantee // Learn more about this Paysongarantin: http://www.payson.se/About/Guarantee/ $GuaranteeOffered = "1"; // MD5-hash calculated from the parameters above $MD5string = $SellerEmail . ":" . $Cost . ":" . $ExtraCost . ":" . $OkUrl . ":" . $GuaranteeOffered . $Key; $MD5Hash = md5($MD5string); ################################################################################### // PAYSON formulär // TEST // <form action="https://www.payson.se/testagent/default.aspx" method="post"> echo' <form action="https://www.payson.se/merchant/default.aspx" method="post"> <input type="hidden" name="BuyerEmail" value="'.$BuyerEmail.'" /> <input type="hidden" name="AgentID" value="'.$AgentID.'" /> <input type="hidden" name="Description" value="'.$Description.'" /> <input type="hidden" name="SellerEmail" value="'.$SellerEmail.'" /> <input type="hidden" name="Cost" value="'.$Cost.'" /> <input type="hidden" name="ExtraCost" value="'.$ExtraCost.'" /> <input type="hidden" name="OkUrl" value="'.$OkUrl.'" /> <input type="hidden" name="CancelUrl" value="'.$CancelUrl.'" /> <input type="hidden" name="RefNr" value="'.$RefNr.'" /> <input type="hidden" name="MD5" value="'.$MD5Hash.'" /> <input type="hidden" name="GuaranteeOffered" value="'.$GuaranteeOffered.'" /> <input type="submit" value="Klicka här för att betala!" /> <br /><br /> <img src="payson_logo/payson145x42.png" alt="Betala med Payson" /> </form> '; ################################################################################### ?>
But you will probably need to also convert amounts to the 100,00 format (Paypal uses . instead of ,)