Show Posts


Topics - vishwanath

Pages: [1]
1
Hi,
How can i check a payment method is enabled or disabled on confirm page ? Like as suppose, if we have first enabled the XYZ payment method form admin and customer have chosen the XYZ payment method and goes to confirm page meanwhile we have disabled the XYZ payment method form admin and customer click on confirm order button. But since payment method is disabled form admin so it wouldn't work. But i want to check first that XYZ is enabled or not if it is disabled then it will give a alert message with "The requested payment method in not available." like as in Magento and if it is enabled then it will work as normal.

How can i do this in Abantecart?

2
Hi All,

I have make config.xml file and have one field as notification url
<item id="custom_hpp_notificationURL">
            <type>input</type>
            <default_value>HTTP_SERVER/index.php?rt=extension/custom_hpp/callback</default_value>
        </item>

i want two things here :

1) it will return full URL in admin on payment configuration page as
fullURL/index.php?rt=extension/custom_hpp/callback

2) make this filed disabled or non editable for admin.

How can i do this? Please help me.
Thnaks,

3
Hi All,

I have made a payment module which is API based. I have done for the Non-3ds type credit card but for 3ds based credit card i have redirect the customer to third url called ASCURL. So how to achieve this.

4
Payment Modules / Create custome payment module for Hosted Payment Page
« on: October 04, 2016, 02:21:35 PM »
Hi All,

I am creating one custom payment module for a payment gateway. I have created a hidden form with all required parameter to submit to payment gateway. Form is submitting properly, user is doing payment with there card, after payment gateway return to url that i need to pass as SUCCESSURL and i am setting this as checkout/success as URL. In this url gateway add TRANASCTIONID and REFERENCEID that i need to save and if no TRANASCTIONID found then i need to make order fail of retirn to payment page.

My problem is how order is being created in admin with incomplete status. So how i make it in processing status sot that user can see there order in account. Also how i save TRANASCTIONID and REFERENCEID ???


My controller code is as follow :
class ControllerResponsesExtensionCustomHpp extends AController {

    public function main() {
        $fields = array();

        $this->load->model('checkout/order');
        $this->loadLanguage('custom_hpp/custom_hpp');


        $cancel_url = $this->request->get['rt'] != 'checkout/guest_step_3' ? $this->html->getSecureURL('checkout/payment') : $this->html->getSecureURL('checkout/guest_step_2');

        $order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);
        $products = '';
        foreach ($this->cart->getProducts() as $product) {
            $products .= $product['quantity'] . ' x ' . $product['name'] . ', ';
        }

        $this->load->library('encryption');
        $encryption = new AEncryption($this->config->get('encryption_key'));

        $hpp_url = $this->config->get('custom_hpp_paymentURL');
        $fields = array(
            'auth' => $this->config->get('custom_hpp_authID'),
            'acid' => $this->config->get('custom_hpp_accountID'),
            'successurl' => $this->html->getSecureURL('checkout/success').'&',
            'product' => $products,
            'amount' => $this->currency->format($order_info['total'], $order_info['currency'], $order_info['value'], FALSE),
            'currency' => 'USD',//$order_info['currency'],
            'Reference' => $this->session->data['order_id'],
            'FirstName' => $order_info['payment_firstname'],
            'LastName' => $order_info['payment_lastname'],
            'Address' => $order_info['payment_address_1'].''.$order_info['payment_address_2'],
            'City' => $order_info['email'],
            'State' => $order_info['payment_zone'],
            'Country' => $order_info['payment_iso_code_2'],
            'PostCode' => substr($order_info['payment_postcode'], 0, 9),
            'Phone' => $order_info['telephone'],
            'Email' => $order_info['email'],
        );

        $form = new AForm();
        $form->setForm(array('form_name' => 'checkout'));
        $data['form']['form_open'] = $form->getFieldHtml(array('type' => 'form',
            'name' => 'checkout',
            'action' => $hpp_url));

        foreach ($fields as $key => $value) {
            $data['form'][$key] = $form->getFieldHtml(array('type' => 'hidden',
                'name' => $key,
                'value' => $value
            ));
        }
            if ($this->request->get['rt'] == 'checkout/guest_step_3'){
         $back = $this->html->getSecureURL('checkout/guest_step_2', '&mode=edit', true);
      } else{
         $back = $this->html->getSecureURL('checkout/payment', '&mode=edit', true);
      }
        $data['form']['back'] = $form->getFieldHtml(array('type' => 'button',
            'name' => 'back',
            'text' => $this->language->get('button_back'),
            'style' => 'button',
            'href' => $back));
        $data['form']['submit'] = $form->getFieldHtml(array('type' => 'submit',
            'name' => $this->language->get('button_confirm')
        ));
        $this->view->batchAssign($data);
      
        $this->processTemplate('responses/custom_hpp.tpl');
       
    }
   }

Pages: [1]

Powered by SMFPacks Social Login Mod