
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 ,)
OK. I'l try that. Thank you for your help. I'v been trying to implement this for a long time. So thank you so much.Navaldesign wrote:You can't redirect to any other page than "thankyou"
If you want both, just remove the if statement (leaving in place the part that is between the { and }
if(....) Remove this line
{ Remove this line
........
........
........
........
} Remove this line
I figuerd it out now:Navaldesign wrote:What would a "submit" button do in that page ?? There is no form in that page (other than the PayPal button, which is a form)
So what purpose would this "submit" button serve ??
Code: Select all
?php
if ($_SESSION['paymenttype'] == "Faktura")
{
$form = '
<form action="./faktsend.php" method="post">
<a href="./faktsend.php"><img src="images/fakturabet2.png" id="Image5" alt="" border="0" style="width:180px;height:66px;"></a></div>
<input type="submit" id="Button1" name="" value="" class="" style="">
</form>
';
echo $form;
}
?>
Yes i got it, the code i posted works.Navaldesign wrote:You can use a button (not submit) or an image, linked to the invoice details page.
Code: Select all
<?php
if ($_SESSION['paymenttype'] == "Faktura")
{
?>
<a href="./faktsend.php"><img src="images/fakturabet2.png" id="Image5" alt="" border="0" style="width:180px;height:66px;"></a>
<?php
}
?>
Ohh i see i tryed somthing like this but i dident have the php break code so it dident work. That is, i dident have ?> before a href and not <?php after.Navaldesign wrote:Code: Select all
<?php if ($_SESSION['paymenttype'] == "Faktura") { ?> <a href="./faktsend.php"><img src="images/fakturabet2.png" id="Image5" alt="" border="0" style="width:180px;height:66px;"></a> <?php } ?>
This is enough, you need no form !
1. So do they bouth containe the comma i want to remove?Navaldesign wrote:1. You can edit the admin_mail_webshop.php and auto_mail_webshop.php templates in the cart/dbts_includes folder.
2. Not sure what you mean
OK can you tell how?Navaldesign wrote:The comma is part of the template.
To change the currency symbol order you also need to modify the codes.
OK i'l do that. If finde the time, could you possibly chow how to make a emty entire cart button in the cart.php page or meybe implement it in the Shop?Navaldesign wrote:Patrik please understand that all this is a free extra to WWB. They are provided "AS IS". It is impossible to teach you how to code in PHP or how to modify the standard tools, at least not without losing valuable time.
Just open the files, and have a look, then try at least to find out by yourself.
OK, Thanks.Navaldesign wrote:Just add a link to the "cancel" page, this empties the entire cart.
1. Is it this $strHTML = "<H3>".$empty_cart_label."</H3>"; i change for emty cart to show another page? Do i only put a h ref inside "" ?Navaldesign wrote:First post: Yes, but you need to edit the code in the cart.php page
Second post: because the template centers verically the content in each table cell, "middle"
You can change the email templates code to allign "top".
Code: Select all
$HTMLmessage .= '<tr>
<td align="center" valign="middle" style="border: '.$border_width.'px '.$border_clr.' '.$border_type.'" bgcolor="'.$header_bgrd_clr.'" height="30">';
$HTMLmessage .= stripslashes($htmlbodystart);
$HTMLmessage .= '</td>
</tr>';