All posts in Cake PHP

CakePHP – Sort Find() results by Array of Ids? – Order by Array – MYSQL

This is one of the question I was faced in my recent project. I would like to share the same with you.

It was raised when I have to order paginate results in an order of set of IDs. I was trying to recall many scenarios. But no use.

Then I was started thinking, do MySQL have any similar option, Yes, MySQL have it’s FIELD(). It was really awesome one and which help me furnish my needs well.

Continue reading →

CakePHP 2.0 501 Not implemented error on form submission – Fix

Yesterday I was found strange issue with my new cake project. It was running great in local machine windows as well Linux machine. Developer has moved them to live sever with CentOs 5.8. After a few minutes I got call from Client representative that “Nothing is working”. Then I go through it and finally realized that there is an issues in add action of a major module. I was checking submitting by form many times. Issues are keeping on coming and are very strange too. Because form was just one input (select) and submit button. I was checked the security module, even after disabling it, we are getting same issues.

Continue reading →

Cake PHP Optimal Payment Component with ccPurchase, ccAuthorize, ccVerification, ccSettlement, ccStoredDataPurchase and ccStoredDataAuthorize

After few days days of testing in live of this the component, I have decided to publish this component to open source  to community. I have implemented because, I found the lack of  proper PHP codes for O ptimal Payment. Even though the implementation is too power full it lacks proper documentation and PHP codes. I have implemented same for cake php 2.0 . But I will release the Core PHP version in the next  post.

we have implemented optimal payment web services API for this Payment implementation. This truly power full as it have all facilities which PayPal and provides in a bit complex way are done here much easily. The main features are

  1. Purchase with credit card info .
  2. Purchase Authorization with credit card info  : [for those who not aware about Auth:, This is process of getting a permission to get a money(Called Capture) in future based on users permission gained in Approval(Authorization) part. ]
  3. Verify/Validate the credit card Information.
  4. Ability to purchase new item/product based on  users  previous purchase data(Doesn’t means  we are saving an credit card info).

Continue reading →

Challenges in Payment gateway integration

A few months after I left Agriya, I got an opportunity to work the Payment Gateway Integration.  You may wonder why I have mentioned Agriya here. Yes, that’s truly important as I have done more than 25 different payment gateways for various countries in Agriya in a short duration of 3months.  This is because, that was peak time for Agriya’s Groupon and Fiverr  clone scripts. I sware, still Agriya’s groupon and fiverr clones are the best in industry. This is because, they are equipped with perfect implementation, security, efficiency and  features. I appreciate the hands and brains behind it. So I thought of sharing some sharing a common points I come across in these


Continue reading →

Cake PHP 2.0 matured to beta

Cake PHP, just released its released 2.0 beta version. Main features in the releases

  • Microsoft SqlServer 2008 and 2011 is now a first class citizen
  • FormHelper is now able to guess model metadata again, it is now advisable to hint the helper with the controller $uses property of what models is the controller using. This contrasts with 1.3 applications where $uses supposed a performance hit. This is not true anymore for 2.0 Continue reading →