Reputation: 81
I'm trying for a client to setup the AXEPTA payment system but it's not working and I don't understand where is the problem. Here is the documentation
Here is my code with test data that can be found in AXEPTA docs.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Axepta Silent Post Order</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 50px;
}
form {
max-width: 300px;
margin: 0 auto;
}
</style>
</head>
<body>
<form name="cardForm" action="https://paymentpage.axepta.bnpparibas/payNow.aspx" method="post">
<!-- Replace the hidden input values with your actual values -->
<input type="hidden" name="MerchantID" value="BNP_DEMO_AXEPTA">
<input type="hidden" name="Len" value="459">
<input type="hidden" name="Data" value="63cc9a9b21ecea8795ecf9ff112e81e11f1a13352fbcb69eb58e67572184c59a5328ac607da571c50c1b4c9a79bdbab3b2626f8b3f60e037d93b0d0753b0e163386ae7fcd0fd6c5845c75fd1e03f951711d3f1608dc3b42d2b4842a1c41eb2d1635f9e9216211591c87bada29879bd1125725982025547b62ed3b2fcbb668ee786c7dc700975d00fe2ad4e30f27de664686256a649f010d5b2a40b65f5baf0b44153478374223d16b3900fc21ddfd4364513f2ea1ba15c5704d5906adeec028768f57f0f33b4fd732be532bcc175faa24092a977b58eec726f9b8256425d5704e275b7411ba05dfad9202384fb2e43b6a77ade73f1c34e7811532142ec35d8347f8a3c1c1c0d592a50642e7eed6eb3c7e0003938cc4aef4c55177761ee70721f12893e0f0b9b29b3c14f4194fc713f6f1f2301353eeebf9e35046bd6ed2fd3eca41c2161456fcdb90fac49fb0cc558269f412da8900149f257c2166e194e090a1c65c8ecb1678a34f62513ebf43de8db6590e812621a9a6bfc47d0399b98a393a53cef1618dcec786ba80270fc17c1aab09ffdd052ee36b9bf373daf4367b9a79a21cb1c4e5a6541009c15e29957c11c1ac001e1cfc9714b7ab5ee0cab0fa01d08e05828b997854ad7fdcfb772b9d67f">
<input type="submit" value="Submit">
</form>
<script>
</script>
</body>
</html>
This is the data before it's encoded:
TransID=101664548923266214628&Amount=20&Currency=EUR&URLSuccess=https://www.example.com/success.php&URLFailure=https://www.example.com/failure.php&URLNotify=https://www.example.com/notify.php&OrderDesc=order1&UserData=John Doe&Capture=AUTO&Response=encrypt&MAC=1ac6ac3383b1d99d55694574a4177f1937db0ed91b7976dab111c61a61b0416a&cardNumber=5232122189301469&cardExpiryMonth=10&cardExpiryYear=2024
When I click on submit I fall on my failure.php page and the URL is:
The un-encrypted data are in this response is:
mid "BNP_DEMO_AXEPTA"
PayID "00000000000000000000000000000000"
Status "FAILED"
Code "20500077"
Description "NO VALID PAYMETHOD FOUND"
TransID "101664548923266214628"
MAC "95345B6B5DD9D3FF0EA470F099069B509B3DB274588E48341F8CD24B0FC42C73"
This is the failure.php code:
<?php
echo "Payment failed!<br>";
echo "Response Code: " . $_POST['Code'] . "<br>";
echo "Description: " . $_POST['Description'];
?>
Here is a useful tool they provide for encryptions: Here
I've tried everything, and I'm really struck, I don't understand why something that straightforward is not working.
Any help would be really welcome!
Hosted payment method are working fine, with test Data it's working fine at least... But when it comes to merchant hosted page like silent post order here, it's not working at all.
Upvotes: 0
Views: 193
Reputation: 4678
Just read the documentation, just check the parameters you pass to the page and the parameters required
Passed:
<form name="cardForm" action="https://paymentpage.axepta.bnpparibas/payNow.aspx" method="post">
<!-- Replace the hidden input values with your actual values -->
<input type="hidden" name="MerchantID" value="BNP_DEMO_AXEPTA">
<input type="hidden" name="Len" value="459">
<input type="hidden" name="Data" value="63cc9a9b21ecea8795ecf9ff112e81e11f1a13352fbcb69eb58e67572184c59a5328ac607da571c50c1b4c9a79bdbab3b2626f8b3f60e037d93b0d0753b0e163386ae7fcd0fd6c5845c75fd1e03f951711d3f1608dc3b42d2b4842a1c41eb2d1635f9e9216211591c87bada29879bd1125725982025547b62ed3b2fcbb668ee786c7dc700975d00fe2ad4e30f27de664686256a649f010d5b2a40b65f5baf0b44153478374223d16b3900fc21ddfd4364513f2ea1ba15c5704d5906adeec028768f57f0f33b4fd732be532bcc175faa24092a977b58eec726f9b8256425d5704e275b7411ba05dfad9202384fb2e43b6a77ade73f1c34e7811532142ec35d8347f8a3c1c1c0d592a50642e7eed6eb3c7e0003938cc4aef4c55177761ee70721f12893e0f0b9b29b3c14f4194fc713f6f1f2301353eeebf9e35046bd6ed2fd3eca41c2161456fcdb90fac49fb0cc558269f412da8900149f257c2166e194e090a1c65c8ecb1678a34f62513ebf43de8db6590e812621a9a6bfc47d0399b98a393a53cef1618dcec786ba80270fc17c1aab09ffdd052ee36b9bf373daf4367b9a79a21cb1c4e5a6541009c15e29957c11c1ac001e1cfc9714b7ab5ee0cab0fa01d08e05828b997854ad7fdcfb772b9d67f">
<input type="submit" value="Submit">
</form>
Does it match ? (tips: it's NO :D )
Upvotes: 0