-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
544018f
commit 049fcbf
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
Plugin/Pmclain/AuthorizenetCim/Model/Adapter/AuthorizenetAdapter.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
namespace RWCandy\Core\Plugin\Pmclain\AuthorizenetCim\Model\Adapter; | ||
use Pmclain\Authnet\CustomerProfile as CP; | ||
use Pmclain\Authnet\TransactionRequest as TR; | ||
use Pmclain\Authnet\TransactionRequest\Order as TRO; | ||
use Pmclain\AuthorizenetCim\Gateway\Request\CustomerDataBuilder as CDB; | ||
use Pmclain\AuthorizenetCim\Gateway\Request\PaymentDataBuilder as PDB; | ||
use Pmclain\AuthorizenetCim\Model\Adapter\AuthorizenetAdapter as Sb; | ||
// 2019-11-19 | ||
final class AuthorizenetAdapter { | ||
/** | ||
* 2019-11-19 | ||
* 1) «Undefined offset: 0 in /vendor/pmclain/magento2-autherizenetcim/Model/Adapter/AuthorizenetAdapter on line 160»: | ||
* https://github.com/royalwholesalecandy/core/issues/17 | ||
* 2) https://developer.authorize.net/api/reference/features/customer_profiles.html#Duplicate_Profile_Verification | ||
* 3) https://community.developer.authorize.net/t5/Integration-and-Testing/E00039-A-duplicate-record-already-exists/m-p/60748/highlight/true#M35260 | ||
* 4) https://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-profile | ||
* @see \Pmclain\AuthorizenetCim\Model\Adapter\AuthorizenetAdapter::saleForNewProfile() | ||
* @used-by \Pmclain\AuthorizenetCim\Gateway\Http\Client\TransactionSale::process() | ||
* @param Sb $sb | ||
* @param array(string => mixed) $d | ||
*/ | ||
function beforeSaleForNewProfile(Sb $sb, array $d) { | ||
$cp = $d[CDB::CUSTOMER_PROFILE]; /** @var CP $cp */ | ||
$tr = $d[PDB::TRANSACTION_REQUEST]; /** @var TR $tr */ | ||
$cp->setDescription($tr->toArray()[TR::FIELD_ORDER][TRO::FIELD_INVOICE_NUMBER]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version='1.0'?> | ||
<config | ||
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' | ||
xsi:noNamespaceSchemaLocation='urn:magento:framework:ObjectManager/etc/config.xsd' | ||
> | ||
<!-- 2019-11-19 | ||
«Undefined offset: 0 in /vendor/pmclain/magento2-autherizenetcim/Model/Adapter/AuthorizenetAdapter on line 160»: | ||
https://github.com/royalwholesalecandy/core/issues/17 --> | ||
<type name='Pmclain\AuthorizenetCim\Model\Adapter\AuthorizenetAdapter'> | ||
<plugin | ||
name='RWCandy\Core\Plugin\Pmclain\AuthorizenetCim\Model\Adapter\AuthorizenetAdapter' | ||
type='RWCandy\Core\Plugin\Pmclain\AuthorizenetCim\Model\Adapter\AuthorizenetAdapter' | ||
/> | ||
</type> | ||
</config> |