cancel
Showing results for 
Search instead for 
Did you mean: 

Surcharge Using "Create an Accept Payment Transaction" (PHP)

I'm using "Create an Accept Payment Transaction" (PHP). My client would like for those using the payment form on his website to pay the surcharge (which is 2.7% + 10 cents per transaction).

 

I already added this to createAnAcceptPaymentTransaction():

 

//surcharge amount
$surchargeAmount = $amount * .027 + .1;
$surchargeAmount = number_format($surchargeAmount, 2, '.', '');
$surcharge = new AnetAPI\ExtendedAmountType();
$surcharge->setName("Credit Card Surcharge");
$surcharge->setAmount($surchargeAmount);
$surcharge->setDescription("Surcharge");

 

I also added this:

$transactionRequestType->setSurcharge($surcharge);

 

If I submit a payment of $0.50 (the amount I send does not include the surcharge -- if this is wrong I'd like to know), the Authorize.net panel shows the following:

 

Settlement Amount: $0.50

Authorization Amount: $0.50

Surcharge: $0.11

 

My credit card shows a charge of $0.50.

 

I explained to my client that in order to be able to do surcharges, he (or someone on his behalf) needs to fill out some application that would allow them to do that. His bank rep insists that this was already completed about 2.5 weeks ago. (I know, the authorize.net website explains that 30 day notice is needed.)

 

When trying to help me troubleshoot, my client's bank rep asks what I entered for the "level." One time he asked if it was level 2 or 3. The API does not mention that.

 

Here is the API documentation (see "surcharge" under "Request Field Description"):

https://developer.authorize.net/api/reference/index.html#accept-suite-create-an-accept-payment-trans...

 

Thanks for any help.

DevDevDev
Member
0 REPLIES 0