cc 大道付款中的 Drupal 自动填写账单信息

Drupal Auto fill billing information in cc avenue payment

我正在使用 Drupal Commerce Cc Avenue as a payment gateway for my eCommerce site. During checkout step user enter his billing information. In the next step it verifies his/her order and redirects to Cc avenue payment gateway, there it asks user billing address again. I want to auto fill the user billing address which he/she enters in previous step. Is that possible to do?

终于在这个问题队列的帮助下找到了答案https://www.drupal.org/node/2310505

在commerce_ccavenue.module中添加了几行 commerce_ccavenue_redirect_form($form, &$form_state, $order, $payment_method)

$billing_address = $wrapper->commerce_customer_billing->commerce_customer_address->value();
  $order_data = array(
    'merchant_id' => $payment_method['settings']['merchant_id'],
    'amount' => $wrapper->commerce_order_total->amount->value() / 100,
    'order_id' => $order->order_id,
    'cancel_url' => url('checkout/' . $order->order_id . '/payment/back/' . $order->data['payment_redirect_key'], array('absolute' => TRUE)),
    'redirect_url' => url('checkout/' . $order->order_id . '/payment/return/' . $order->data['payment_redirect_key'], array('absolute' => TRUE)),
    'working_key' => $payment_method['settings']['working_key'],
    'access_code' => $payment_method['settings']['access_code'],
    'language' => 'EN',
    'currency' => $currency_code,
    'billing_name' => $billing_address['name_line'],
    'billing_address' => $billing_address['thoroughfare']. ' ' . $billing_address['premise'] . ' ' . $billing_address['sub_premise'],
    'billing_zip' => $billing_address['postal_code'],
    'billing_city' => $billing_address['locality'],
    'billing_state' => $billing_address['administrative_area'],
    'billing_country' => 'India',
  );

commerce_ccavenue_redirect_form($form, &$form_state, $order, $payment_method) 中缺少这些行。添加这些行后工作正常。