cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

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

 

jeverd01
Member
2 REPLIES 2

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

RichardH
Administrator Administrator
Administrator

Thanks worked perfect!