Authorize.Net DPM not working

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
dev_podup
Posts: 15
Joined: 10 Aug 2023, 02:06

Authorize.Net DPM not working

Post by dev_podup » 26 Aug 2023, 12:53

Hello,

Version info:
Laravel - 8.x, PHP - 8.0, Aimeos - ~2023.07

I've added authorize.net sandbox account details as a payment providor. But when I reach the checkout process page, enter the details and click on Pay now button the same page keeps reloading. Please find attached the page I'm referring to. Do I need to do more than just add details of payment provider for it to work. Please guide me through it.

Thank you.
Attachments
Checkout process page keeps reloading.
Checkout process page keeps reloading.
Screenshot_3.png (30.23 KiB) Viewed 50172 times

User avatar
aimeos
Administrator
Posts: 7907
Joined: 01 Jan 1970, 00:00

Re: Authorize.Net DPM not working

Post by aimeos » 29 Aug 2023, 11:29

What's the URL of the form that is shown (where the form values are posted to)?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

dev_podup
Posts: 15
Joined: 10 Aug 2023, 02:06

Re: Authorize.Net DPM not working

Post by dev_podup » 29 Aug 2023, 16:36

The URL of the form action was the same as the page URL "http://127.0.0.1:8007/default/shop/checkout/process".
So I checked in Aimeos\MShop\Service\Provider\Payment\AuthorizeDPM, and sure enough, it was returning this.

Code: Select all

$url = $this->getConfigValue( 'payment.url-self', '' );
return new \Aimeos\MShop\Common\Helper\Form\Standard( $url, 'POST', $list, false );
Is there something I need to do besides just setting up Authorize.Net DPM provider? Do I need to extend it by making my own custom class, if so how?

User avatar
aimeos
Administrator
Posts: 7907
Joined: 01 Jan 1970, 00:00

Re: Authorize.Net DPM not working

Post by aimeos » 31 Aug 2023, 06:29

When the browser sends the form values to the server, this method is called:
https://github.com/aimeoscom/ai-payment ... #L357-L364

If the necessary data is available, this method should be executed:
https://github.com/aimeoscom/ai-payment ... #L904-L939

Can you confirm?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

dev_podup
Posts: 15
Joined: 10 Aug 2023, 02:06

Re: Authorize.Net DPM not working

Post by dev_podup » 31 Aug 2023, 07:26

When I submit the form this method process() is called.
https://github.com/aimeoscom/ai-payment ... #L357-L364

But not the processOrder() one.
https://github.com/aimeoscom/ai-payment ... #L904-L939

Kindly provide help to fix this issue.

User avatar
aimeos
Administrator
Posts: 7907
Joined: 01 Jan 1970, 00:00

Re: Authorize.Net DPM not working

Post by aimeos » 01 Sep 2023, 10:23

The the CC number and CVV fields named differently than expected here?
https://github.com/aimeoscom/ai-payment ... y.php#L359
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

dev_podup
Posts: 15
Joined: 10 Aug 2023, 02:06

Re: Authorize.Net DPM not working

Post by dev_podup » 02 Sep 2023, 07:07

Yes, the form that is displayed there has different field names than the expected ones.

User avatar
aimeos
Administrator
Posts: 7907
Joined: 01 Jan 1970, 00:00

Re: Authorize.Net DPM not working

Post by aimeos » 03 Sep 2023, 18:47

What are the used names for the values?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

dev_podup
Posts: 15
Joined: 10 Aug 2023, 02:06

Re: Authorize.Net DPM not working

Post by dev_podup » 04 Sep 2023, 05:25

These are the respective field names on the form.
First name - x_first_name
Last name - x_last_name
Credit card number - x_card_num
Verification number - x_card_code
payment.expirymonthyear - x_exp_date

Do I need to somehow customize this form for it to work?

User avatar
aimeos
Administrator
Posts: 7907
Joined: 01 Jan 1970, 00:00

Re: Authorize.Net DPM not working

Post by aimeos » 04 Sep 2023, 09:14

The field names seem to be OK but the form action needs to be the URL of the authorize.net server:
https://community.developer.cybersource ... /ba-p/7014

Post URL: https://secure.authorize.net/gateway/transact.dll

This URL should be returned here instead of the "self" URL:
https://github.com/aimeoscom/ai-payment ... M.php#L186

Can you check if it works when you exchange the POST URL?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply