I want to "authorize-only" instead of "authorize+capture" only for WHOLESALERS. Where as for other customers it should be "authorize+capture". How to do this?
My payment gateway is Authorize.net.
Thanks,
Aditya
I want to "authorize-only" instead of "authorize+capture" only for WHOLESALERS. Where as for other customers it should be "authorize+capture". How to do this?
My payment gateway is Authorize.net.
Thanks,
Aditya
You'll need to customize the code in your payment module to have it determine whether the customer is a wholesaler or not, and have it take appropriate action accordingly.
Being mindful that "wholesale" is not a built-in feature in the Zen Cart code, so whatever you're doing is in conjunction with other addons, and any solution you devise is custom to your specific setup.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Hello,
Thanks for your response. Could you please tell me in which page I need to customize the code?
Also, Authorize.net people said that "what it needs to be done is a way for the wholesale customers transactions be "authorize only"and from them I can just complete the transaction on their website". Is this correct?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Finally, I have figured it out.
Here goes the solution....
File Name: /includes/modules/payment/authorizenet_aim.php
In this file search for "$submit_data". This Populate an array that contains all of the data to be sent to Authorize.net.
In this array, find and comment the below line.
// 'x_type' => MODULE_PAYMENT_AUTHORIZENET_AIM_AUTHORIZATION_TYPE == 'Authorize' ? 'AUTH_ONLY': 'AUTH_CAPTURE',
and finally, add the below code after the array ends and above the line that shows "unset($response);". Line #300 around...
Code:
// Authorisation based on customer
if($_SESSION['customer_whole'] == '0'){
$submit_data['x_type']='AUTH_CAPTURE';
}else{
$submit_data['x_type']='AUTH_ONLY';
}
That's it...
Thanks,
Aditya
Bookmarks