Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the uc_cybersource.module, there are several calls to a variable named uc_cybersource_transaction_type. However, the variable name is actually uc_cybersource_hop_transaction_type
Comment | File | Size | Author |
---|---|---|---|
#8 | 1387768-uc_cybersource_transaction_type.patch | 2.72 KB | longwave |
Comments
Comment #1
TR CreditAttribution: TR commentedComment #2
victorforsythe CreditAttribution: victorforsythe commentedIs this true? do we have to change the variable name in the file? Please, are there any comments about this issue?
Comment #3
longwaveAre you using CyberSource? Are you having any problems with it? This seems like it would only affect things if you are using "Authorize only" mode in CyberSource, as opposed to "Authorize and capture".
Comment #4
terbs CreditAttribution: terbs commentedYeah I'm using authorize only and it was causing problems so I had to change the name of the variable to fix it. I really think it's just a small error in the code.
Comment #5
streamfan CreditAttribution: streamfan commentedYes, I was having problems! I could not figure out why I could not only authorize charges.
There are some other related changes to be made in _uc_cybersource_post_charge. On line 657
$request['orderPage_transactionType'] = variable_get('uc_cybersource_transaction_type', 'sale')
if one changes it to
$request['orderPage_transactionType'] = variable_get('uc_cybersource_hop_transaction_type', 'sale')
that only uses the default value.
An array called $data gets passed in from function uc_credit_terminal_form_submit($form, &$form_state) in uc_credit_admin. It has an element of txn_type which determines whether its a sale (auth_capture) or just an authorization.
so in pseudo code something like
if ($data['txn_type') = 'auth_capture')
$request['orderPage_transactionType'] = 'sale';
else
$request['orderPage_transactionType'] = 'authorize';
This code is reached after I enter an order on an admin page and then view the order and select process card which goes to the /admin/store/orders/#ordernum/credit screen
This addressed the issue, Is there any work in progress that then allows one to capture the previously authorized charge? It looks like there is code in uc_credit_terminal_form_submit that addresses some of this. Not sure how to access it in Cybersource just yet.
Comment #6
ruichen CreditAttribution: ruichen commentedI have a hard time to make cybersource-hop.php issue work.
I already have my hop.php generated from my cb acct, and move it to the folder of
/var/www/html/0_supertex_beta/sites/all/modules/ubercart/payment/uc_cybersource/
I don't want to use silent order method
all I want is to have cybersource to handle the credit card.
but I don't know how to configure the settings under payment in my drupal site
do I also need to do a patch?
so confused...
Don't know where to find a complete document on setup/configure this payment with hop
and the ubercart's document's video tutorial with no sound.
Would you help?
ruichen
Comment #7
longwaveThis issue is not related to getting CyberSource set up; please search drupal.org and ubercart.org for more info on how to configure CyberSource, if you still have problems then open a new support request with full details of what you've tried, any fields you are unsure how to fill in, or any error messages you receive.
Comment #8
longwavePatch seems fairly straightforward, would be nice to get test results from someone if possible though.
Comment #9
longwaveCommitted to both branches.