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,248
Topics: 51
Kudos: 151
Blog Posts: 64
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

--------

Webhooks are now available for Authorize.Net

Using SOAP, see our deprecation notice.
Check out Accept.js, our Javascript replacement for DPM.
Pro Tip: Never use test mode in the sandbox, instead use the Testing Guide.
Member
Posts: 2
Registered: ‎04-13-2017

Re: Accept.js PHP SDK

Thanks worked perfect!