Hello,
I want to integrate CCAvenue payment to my mobile application developed in DrupalGap.

https://www.drupal.org/project/commerce_drupalgap_stripe
https://github.com/signalpoint/commerce

These are the module/code I used to make the implementation for CCAvenue.

Now, I have a service which is called from DrupalGap with the necessary data. From the service/resource I want make a call to commerce_ccavenue module. How can I call the function ccavenue_redirect_form() in commerce_ccavenue.module from my service's .inc file?

Resouce file:

function commerce_drupalgap_ccavenue_services_resources() {
  $resources = array(
    'commerce-payment-ccavenue' => array(
      'actions' => array(
        'create' => array(
          'help' => 'Creates a new payment transaction for an existing order.',
          'file' => array(
            'type' => 'inc',
            'module' => 'commerce_drupalgap_ccavenue',
            'name' => 'resources/payment',
          ),
          'callback' => 'commerce_drupalgap_ccavenue_create',
          'args' => array(
            array(
              'name' => 'payment_details',
              'optional' => FALSE,
              'source' => array('data' => 'payment_details'),
              'description' => 'The payment transaction data to set on create.',
              'type' => 'array',
            ),
          ),
          'access callback file' => array(
            'type' => 'inc',
            'module' => 'drupalgap',
            'name' => 'drupalgap.resource',
          ),
          'access callback' => 'commerce_drupalgap_ccavenue_create_access',
          'access arguments append' => TRUE,
        ),
      ),
    ),
  );

  return $resources;
}

resources/payment.inc

function commerce_drupalgap_ccavenue_create($data) {
  // How to call ccavenue_redirect_form() of commerce_ccavenue module?
}

Regards,
Saneesh.

Comments

Saneesh created an issue. See original summary.

Saneesh’s picture

Issue summary: View changes