Page 1 of 1

Payment

Posted: Sat Oct 02, 2010 11:56 pm
by Patrik iden
Is there no one that can make payment whit Payson work on the original webshop? I have som codes to Payson but dont now how to insert them in shop.

Payson Code-1:


<?php
if(!isset($_POST['submit']))
{
header("Location: checkout.php");
exit;
}

$AgentID="****"; (your ID from payson registration)
$Key="********-********-****-************";(your KEY from payson registration)


$RefNr = "%webid%";
$SellerEmail = "your@paysonaccountemail.se";
$BuyerEmail = $_POST['BuyerEmail'];
$BuyerFirstName = $_POST['BuyerFirstName'];
$BuyerLastName = $_POST['BuyerLastName'];
$Cost = $_POST['Cost']; //Cost of item or service
$ExtraCost = "0"; //Shipping
$OkUrl = "http://www.yourshopurl/verify.php";
$CancelUrl = "http://www.yourshopurl/error.php";
$Description = $_POST['RefNr']; //Merchant reference number
$GuaranteeOffered = "0";
$PaymentMethod = "";


Payson Code-2:

<?php
require_once("send.php");
?>
<form action="https://www.payson.se/merchant/default.aspx" method="post">

<input type="hidden" name="BuyerEmail" value="<?php echo $BuyerEmail ?>">
<input type="hidden" name="AgentID" value="<?php echo $AgentID ?>">
<input type="hidden" name="Description" value="<?php echo $Description ?>">
<input type="hidden" name="SellerEmail" value="<?php echo $SellerEmail ?>">
<input type="hidden" name="Cost" value="<?php echo $Cost ?>">
<input type="hidden" name="ExtraCost" value="<?php echo $ExtraCost ?>">
<input type="hidden" name="OkUrl" value="<?php echo $OkUrl ?>">
<input type="hidden" name="CancelUrl" value="<?php echo $CancelUrl ?>">
<input type="hidden" name="RefNr" value="<?php echo $RefNr ?>">
<input type="hidden" name="MD5" value="<?php echo $MD5Hash ?>">
<input type="hidden" name="GuaranteeOffered" value="<?php echo $GuaranteeOffered ?>">

<input type="submit" value="Send request">
</form>

Any idees? Pleas help me. :oops:

Re: Payment

Posted: Sun Oct 03, 2010 7:45 am
by Pablo
I'm sorry we cannot provide help on custom coding. This is out of the scope of this forum.

Re: Payment

Posted: Sun Oct 03, 2010 2:31 pm
by Navaldesign
Furthermore, the code you posted requires study of the Payson documentation as to how the includes are used and how the MDHash is created.

In other words, at least some hours of work.