We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Add-on-development, Shop

Custom Gateways - Perch Shop

Hey,

I'm working on a custom gateway implementation, is there a way to create a file in a location that doesn't get overwritten on Perch Shop update?

Thanks!

Ryan Gittings

Ryan Gittings 1 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you can put the file anywhere outside the perch/core folder. A logical place would be to create a shell of an app for it.

apps/my_gateway
apps/my_gateway/admin.php
apps/my_gateway/runtime.php
apps/my_gateway/PerchShopGateway_mygateway.class.php

Use the admin and runtime files to include your gateway class.

Ryan Gittings

Ryan Gittings 1 points
Registered Developer

Class 'PerchShopGateway_default' not found

Do I need to include the default too? Getting that admin side when viewing orders.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'd need more of a clue!