Skip to content
Browse files

Adapted tests to updated required fields

  • Loading branch information...
1 parent 170e809 commit 9f78087810215b8441f10b8dfe5819e4bdc4e12c @goemaere goemaere committed Jun 7, 2012
Showing with 8 additions and 3 deletions.
  1. +3 −1 tests/Ogone/Tests/FormGeneratorTest.php
  2. +5 −2 tests/TestCase.php
View
4 tests/Ogone/Tests/FormGeneratorTest.php
@@ -23,13 +23,15 @@ public function GeneratesAForm()
'<form method="post" action="https://secure.ogone.com/ncol/test/orderstandard_utf8.asp" id="ogone" name="ogone">
<input type="hidden" name="pspid" value="123456789" />
<input type="hidden" name="orderid" value="987654321" />
+ <input type="hidden" name="currency" value="EUR" />
+ <input type="hidden" name="amount" value="100" />
<input type="hidden" name="cn" value="Louis XIV" />
<input type="hidden" name="owneraddress" value="1, Rue du Palais" />
<input type="hidden" name="ownertown" value="Versailles" />
<input type="hidden" name="ownerzip" value="2300" />
<input type="hidden" name="ownercty" value="FR" />
<input type="hidden" name="email" value="louis.xiv@versailles.fr" />
- <input type="hidden" name="amount" value="100" />
+
<input type="hidden" name="SHASIGN" value="foo" />
<input type="submit" value="Submit" id="ogonesubmit" name="ogonesubmit" />
</form>';
View
7 tests/TestCase.php
@@ -31,15 +31,18 @@ protected function provideMinimalPaymentRequest()
$paymentRequest->setOgoneUri(PaymentRequest::TEST);
+ // minimal required fields for ogone (together with pspid and orderid)
+ $paymentRequest->setCurrency("EUR");
+ $paymentRequest->setAmount(100);
+
+ // these fields are actually optional but are good practice to be included
$paymentRequest->setCustomername("Louis XIV");
$paymentRequest->setOwnerAddress("1, Rue du Palais");
$paymentRequest->setOwnerTown("Versailles");
$paymentRequest->setOwnerZip('2300');
$paymentRequest->setOwnerCountry("FR");
$paymentRequest->setEmail("louis.xiv@versailles.fr");
- $paymentRequest->setAmount(100);
-
return $paymentRequest;
}

0 comments on commit 9f78087

Please sign in to comment.
Something went wrong with that request. Please try again.