I have a form in one of my templates
<form method="post" action="" accept-charset="UTF-8">
<input type="hidden" name="action" value="paypalPayments/payment/pay">
[...]
</form>
I also created a simple plugin like so:
//PaypalPaymentsPlugin.php
<?php
namespace Craft;
class PaypalPaymentsPlugin extends BasePlugin {
function getName() {
return Craft::t('Paypal Payments');
}
function getVersion() {
return '1.0';
}
function getDeveloper() {
return 'Paul Timoce';
}
function getDeveloperUrl() {
return "http://paultimoce.net";
}
}
And also a controller file inside a controller folder:
//File PaypalPayments_PaymentController.php
<?php
namespace Craft;
class PaypalPayments_PaymentController extends BaseController {
public function actionPayWithPaypal()
{
echo "I'm in...";
}
}
All I want to do is post some variables through my form and process them with my plugin controller but every time I submit my form I hit the 404 page...
Do you guys have any idea as to why this is happening? I also installed and activated the sample cocktailRecipes plugin trying to do the same thing but unsuccessfully also... I tried to point my browser to /actions/paypalPayments/payment/pay and /actions/cocktailRecipes/ingredients/saveIngredient but also no luck... I always get redirected to the 404 page.
Can you help?