Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Sagepay class to use the new PaymentMethodInterface spec #8

Merged
merged 1 commit into from
Jun 27, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"autoload": {
"psr-0": {
"SclZfCartSagepay\\": "src/"
}
},
"classmap": [
"./Module.php"
]
}

}
3 changes: 2 additions & 1 deletion src/SclZfCartSagepay/Sagepay.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace SclZfCartSagepay;

use SclZfCart\Entity\OrderInterface;
use SclZfCartPayment\Entity\PaymentInterface;
use SclZfCartPayment\PaymentMethodInterface;
use SclZfCartSagepay\Data\CryptData;
use SclZfCartSagepay\Options\SagepayOptions;
Expand Down Expand Up @@ -124,7 +125,7 @@ protected function getCrypt(OrderInterface $order)
* @return void
* @todo Use a CompleteForm object instead of Form
*/
public function updateCompleteForm(Form $form, OrderInterface $order)
public function updateCompleteForm(Form $form, OrderInterface $order, PaymentInterface $payment)
{
$form->setAttribute('action', $this->options->getConnectionOptions()->getUrl());

Expand Down
4 changes: 3 additions & 1 deletion tests/SclZfCartSagepayTests/SagepayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ public function testUpdateCompleteForm()
->method('add')
->will($this->returnValue($this->cryptData));

$payment = $this->getMock('SclZfCartPayment\Entity\PaymentInterface');

// @todo Check form elements are being added

$this->object->updateCompleteForm($form, $order);
$this->object->updateCompleteForm($form, $order, $payment);
}

/**
Expand Down