Reply
Member
Posts: 2
Registered: ‎04-13-2017

Accept.js PHP SDK

Is it possible to use the php SDK with Accept.js? I see raw xml examples and tried using the AIM class without any luck..

 

Here are examples of what I have tried:

 

$transaction = new AuthorizeNetAIM ('xxx', 'xxx');
$transaction->amount = $amount;
$transaction->card_num = "<opaqueData>
            <dataDescriptor>".$dataDescriptor."</dataDescriptor>
            <dataValue>".$dataValue."</dataValue >
</opaqueData>";

 

---

 

$transaction = new AuthorizeNetAIM ('xxx', 'xxx');
$transaction->amount = $amount;
$transaction->card_num = $noOnceArray;

 

--

 

 

$transaction = new AuthorizeNetAIM ('xxx', 'xxx');
$transaction->amount = $amount;
$transaction->card_num = (object) $noOnceArray;

 

 

With array and php I get a similar object indicating it's just echoing the item as a string

 

<b>Warning</b>:  urlencode() expects parameter 1 to be string, object given in

 

Posts: 2,527
Topics: 56
Kudos: 200
Blog Posts: 67
Registered: ‎12-05-2011

Re: Accept.js PHP SDK

A link to PHP sample code using our SDK is available in the API Reference.

 

https://github.com/AuthorizeNet/sample-code-php/blob/master/PaymentTransactions/create-an-accept-pay...

 

Richard


Build modern websites and mobile applications without increasing PCI burden using Authorize.Net Accept


DPM will be disabled in the sandbox on 7/1/2018. EOL 7/1/2019.
Highlighted
Member
Posts: 2
Registered: ‎04-13-2017

Re: Accept.js PHP SDK

Thanks worked perfect!