for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use SilverStripe\Omnipay\Service\ServiceResponse;
/**
* Customisations to {@link Payment} specifically for the shop module.
*
* @package shop
*/
class ShopPayment extends DataExtension
{
private static $has_one = array(
'Order' => 'Order',
);
public function onAwaitingAuthorized(ServiceResponse $response)
$response
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$this->placeOrder();
}
public function onAwaitingCaptured(ServiceResponse $response)
public function onAuthorized(ServiceResponse $response)
public function onCaptured(ServiceResponse $response)
$order = $this->owner->Order();
if ($order->exists()) {
OrderProcessor::create($order)->completePayment();
protected function placeOrder()
OrderProcessor::create($order)->placeOrder();
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.