Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Commit

Permalink
Fixed test.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Nov 18, 2014
1 parent b59b511 commit 5a2fb4d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/SecurityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
class Pronamic_WP_Pay_Gateways_Sisow_SecurityTest extends WP_UnitTestCase {
function test_transaction_request_sha1() {
// http://pronamic.nl/wp-content/uploads/2013/02/sisow-rest-api-v3.2.1.pdf #page 10
$sha1 = Pronamic_WP_Pay_Gateways_Sisow_Client::create_transaction_sha1(
'123456789', // purchase_id
'uniqueentrance', // entrance_code
10, // amount
null, // shop_id
'0123456', // merchant_id
'b36d8259346eaddb3c03236b37ad3a1d7a67cec6' // merchant_key
);
$transaction_request = new Pronamic_WP_Pay_Gateways_Sisow_TransactionRequest();
$transaction_request->set_purchase_id( '123456789' );
$transaction_request->set_entrance_code( 'uniqueentrance' );
$transaction_request->amount = 10;
$transaction_request->shop_id = null;
$transaction_request->merchant_id = '0123456';

$merchant_key = 'b36d8259346eaddb3c03236b37ad3a1d7a67cec6';

$sha1 = $transaction_request->get_sha1( $merchant_key );

$this->assertEquals( 'cb2461bd40ed1a77a6d837a560bfcbc3e03d6c3c', $sha1 );
}
Expand Down

0 comments on commit 5a2fb4d

Please sign in to comment.