public static function getItem($product_code){
        $jsonArr = json_decode(self::$_JSON,true);

        foreach ($jsonArr as $item) {
            if ($item['productCode'] == $product_code) {
                return new PaymentProduct($item['productCode'],
                $item['brandName'],
                $item['category'],
                $item['can3ds'],
                $item['canRefund'],
                $item['canRecurring'],
                $item['comment'],
                $item['basketRequired']);
             break;
            }
        }
    }
public static function getItem($product_code){
        $jsonArr = json_decode(self::$_JSON,true);

        foreach ($jsonArr as $item) {
            if ($item['productCode'] == $product_code) {
                return new PaymentProduct($item['productCode'],
                $item['brandName'],
                $item['category'],
                $item['can3ds'],
                $item['canRefund'],
                $item['canRecurring'],
                $item['comment'],
                $item['basketRequired']);
             break;
            }
        }
    }
public static function getItem ( $ product_code ) { $ jsonArr = json_decode ( self :: $ _JSON , true ) ; foreach ( $ jsonArr as $ item ) { if ( $ item [ 'productCode' ] == $ product_code ) { return new PaymentProduct ( $ item [ 'productCode' ] , $ item [ 'brandName' ] , $ item [ 'category' ] , $ item [ 'can3ds' ] , $ item [ 'canRefund' ] , $ item [ 'canRecurring' ] , $ item [ 'comment' ] , $ item [ 'basketRequired' ] ) ; break ; } } }
Get a Payment Product item with a code

@param string $product_code
@return null|PaymentProduct
Get a Payment Product item with a code