Currently authorization,create_payment_token is supported but from what I understand of Cybersource API documentation the same request format is required for sale,create_payment_token.
Can we simply extend this with:
const COMMERCE_CYBERSOURCE_SAHC_TRANSACTION_SALE_CREATE_TOKEN = 'sale,create_payment_token';
and
$form['transaction_type'] = [
'#type' => 'select',
'#title' => $this->t('Transaction type'),
'#default_value' => $this->configuration['transaction_type'],
'#required' => TRUE,
'#options' => [
self::COMMERCE_CYBERSOURCE_SAHC_TRANSACTION_AUTH_CREATE_TOKEN => $this->t('Authorize funds and create payment token'),
self::COMMERCE_CYBERSOURCE_SAHC_TRANSACTION_SALE_CREATE_TOKEN => $this->t('Capture funds and create payment token'),
],
];| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3156909-7.sahc_sale.patch | 2.92 KB | rszrama |
Issue fork commerce_cybersource-3156909
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tko commentedComment #3
tko commentedComment #4
tko commentedComment #5
tko commentedComment #6
lunk rat commentedWe wondered why all of our transactions were getting authorized but not automatically settled. The config option provided by this patch resolved the issue for us. Marking RTBC.
Comment #7
rszrama commentedThe patch as written did not properly update the order. I've revised the language and updated
CyberSourceSahc::updatePayment()accordingly. Seems to work in a quick local test.Comment #10
vmarchuk@rszrama
The patch looks good. I checked locally and opened MR to merge.
Comment #12
rszrama commentedCool, merging in. Thanks!