我使用Drupal Commerce Cc Avenue作为我的电子商务网站的支付网关。在结账步骤中,用户输入他的账单信息。在下一步中,它会验证他/她的订单并重定向到Cc avenue支付网关,然后再次询问用户帐单地址。我想自动填写他/她在上一步中输入的用户帐单邮寄地址。这可能吗?
答案 0 :(得分:1)
最后在此问题队列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)中缺少这些行。添加这些行后工作正常。