AuthorizeNet / sdk-php

PHP SDK for Authorize.Net API
Other
427 stars 401 forks source link

Create a Subscription from Customer Profile APi can not work. #284

Open phpstudyone opened 6 years ago

phpstudyone commented 6 years ago

Create a Subscription from Customer Profile API occasionally cannot work. Can you help me?

  1. I create customerPaymentProfileID is successful. image

  2. Then I charge a customer profile id also is successful. image

  3. Then I Get Customer Payment Profile also is successful. image

4. BUT then I Create a Subscription from Customer Profile is failure

image

ashtru commented 6 years ago

I tried replicating the issue, and was able to create the subscription using from a payment profile with similar payment and billing information. Were you able to resolve this issue ? If not, we can work on reproducing it together.

phpstudyone commented 6 years ago

Environment:

sandbox (The formal environment did not observe this problem)

Steps to repeat:

  1. Create Customer Profile and not include paymentProfiles fields. (Using the Accept Customer Hosted Form capture users' Payment info).
  2. through request Get Accept Customer Profile Page getting token.
  3. When the Accept Customer Hosted Form return successful, request Get Customer Profile got payment profile id.
  4. Get PaymentProfileID immediately after request Create a Subscription from Customer Profile. (The interval between steps 3 and 4 must not exceed 20 seconds)

This problem seems to be caused by data synchronization delay.

My temporary solution is: After getting PaymentProfileID, wait 1 minute to create ARB. This time is usually successful.

ashtru commented 6 years ago

Thanks for the detailed steps for reproduction, @phpstudyOne

Yes, the delay in synchronization is possible. This is a plausible workaround. Thanks!

ashtru commented 6 years ago

Also, have you tested your integration using Sandbox recently? Can you reply to the last comment on #301 ?

phpstudyone commented 6 years ago

I am so sorry to keep you waiting.

upgrade to 1.9.6 or replace to lib/ssl/cert.pem can solve this problem(CURL ERROR: SSL certificate problem: unable to get local issuer certificate ).

Is this problem(CURL ERROR: SSL certificate problem: unable to get local issuer certificate ) related to failure to create an ARB?

phpstudyone commented 6 years ago

I took back what I said. Because I found the formal environment also appeared this problem.

Lardpower commented 6 years ago

I have absolutely the same error as @phpstudyOne:

#E00040 - The record cannot be found

So the customer profile is created successfully, but I cannot use it immediately: image

I didn't face this error until the previous week.


I found the same temporary solution about the delay after creating new customer profile in that old thread from Authorize.net forum:

There can be a few seconds latency from the time a profile is created until it becomes available for follow-on requests as data replicates. If you wait a few seconds, does the profile data return?

My tests indicate that I have to wait at least 7-8 seconds after creating the new customer profile before I can proceed and set up new subscription without E00040 error. If I'm waiting about 10 seconds, then I can create successfully subscription with that newly created customer profile. However, some random delay is not an acceptable solution for me.

This error persists in both environments: sandbox and production.

My version of the Authorize.net package: authorizenet/authorizenet 1.9.6

Lardpower commented 6 years ago

@ashtru, do you have any news about this issue?

I see that SDK 1.9.7 has been released, but still I should wait 10 seconds to perform the very base operation — create a new recurring payment. I consider this situation as unacceptable on production environment, where every second matters.

chsriniv9 commented 6 years ago

@phpstudyone @Lardpower We acknowledge that ARB subscription creation failure is due to data synchronization and introducing delay to address this issue is A temporary solution. We are working to enhance server side to offer seamless transaction flow from customer payment profile creation to new recurring payment creation. We will keep you posted.

Lardpower commented 6 years ago

@chsriniv9, thank you.

Lardpower commented 5 years ago

Happy new year everybody.

Is there any progress on this issue or it's abandoned by the developers?

One more question: is there any chance that this problem is solved in the latest release 1.9.9?

Thanks.

dhcrzf commented 5 years ago

I am experiencing this issue as well (with latest Node.js SDK). Introducing the artificial delay of 8 seconds does work.

adamdew commented 5 years ago

Hey everyone, I'm having the same issue as @phpstudyone @Lardpower but only in production, seems to work fine in sandbox. This issue has been open since February 2018, 16 months now. Has anyone come up with any interim solutions other than making users wait 7-10 seconds??

Lardpower commented 5 years ago

Adam, welcome to the club. Authorize.net developers don't care about this issue, so the only "solution" is to wait 10 seconds, even if it sounds crazy in the middle of the 2019 year.

abishekrsrikaanth commented 4 years ago

It kinda sucks that this issue has been going on for this long and hasn't been documented in the integration docs that would help developers if they come across this issue. I wasted about 3-4 hours looking up the docs to figure out what the issue is till I came across this issue report. As a resolution, I charged the customer for the current month and moved the Create Subscription functionality to a delayed queue to start from the next month, so I can send a response back to my customer immediately. Subsequently if the subscription creation fails even after that, then I redo the process again till a success is received from AuthorizeNet.

abishekrsrikaanth commented 4 years ago

@adamdew hopefully ^ helps

TusharJoy commented 4 years ago

Guys please try to solve this problem. It's a severe issue for the production server. I am literally wasting my hours try to find what caused the issue.

phpstudyone commented 4 years ago

Steps to repeat:

  1. Create Customer Profile and not include paymentProfiles fields. (Using the Accept Customer Hosted Form capture users' Payment info).
  2. through request Get Accept Customer Profile Page getting token.
  3. When the Accept Customer Hosted Form return successful, request Get Customer Profile got payment profile id.
  4. Get PaymentProfileID immediately after request Create a Subscription from Customer Profile. (The interval between steps 3 and 4 must not exceed 20 seconds)

This problem seems to be caused by data synchronization delay.

My temporary solution is: After getting PaymentProfileID, wait 1 minute to create ARB. This time is usually successful.

What's even worse now is that there is enough data to show that in the third step above, the user information we obtained will often not have paymentProfileID and payment information. (Waiting for 15s before obtaining is usually successful)

@ashtru @chsriniv9

Stitrans commented 4 years ago

So you know python?

Get Outlook for iOShttps://aka.ms/o0ukef


From: jason zhang notifications@github.com Sent: Monday, December 2, 2019 10:14:03 PM To: AuthorizeNet/sdk-php sdk-php@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [AuthorizeNet/sdk-php] Create a Subscription from Customer Profile APi can not work. (#284)

Steps to repeat:

  1. Create Customer Profilehttps://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-profile and not include paymentProfiles fields. (Using the Accept Customer Hosted Form capture users' Payment info).
  2. through request Get Accept Customer Profile Pagehttps://developer.authorize.net/api/reference/index.html#customer-profiles-get-accept-customer-profile-page getting token.
  3. When the Accept Customer Hosted Form return successful, request Get Customer Profilehttps://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-profile got payment profile id.
  4. Get PaymentProfileID immediately after request Create a Subscription from Customer Profilehttps://developer.authorize.net/api/reference/index.html#recurring-billing-create-a-subscription-from-customer-profile. (The interval between steps 3 and 4 must not exceed 20 seconds)

This problem seems to be caused by data synchronization delay.

My temporary solution is: After getting PaymentProfileID, wait 1 minute to create ARB. This time is usually successful.

What's even worse now is that there is enough data to show that in the third step above, the user information we obtained will often not have paymentProfileID and payment information. (Waiting for 15s before obtaining is usually successful)

@ashtruhttps://github.com/ashtru @chsriniv9https://github.com/chsriniv9

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/AuthorizeNet/sdk-php/issues/284?email_source=notifications&email_token=AN3PGQQQWR625JMN63NY6OLQWXFHXA5CNFSM4EP6C2O2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFX52WA#issuecomment-560979288, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AN3PGQUAEMQVCXQSUKXV2HTQWXFHXANCNFSM4EP6C2OQ.

Stitrans commented 4 years ago

How in the hell do I make invoices with this

Get Outlook for iOShttps://aka.ms/o0ukef


From: jason zhang notifications@github.com Sent: Monday, December 2, 2019 10:14:03 PM To: AuthorizeNet/sdk-php sdk-php@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [AuthorizeNet/sdk-php] Create a Subscription from Customer Profile APi can not work. (#284)

Steps to repeat:

  1. Create Customer Profilehttps://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-profile and not include paymentProfiles fields. (Using the Accept Customer Hosted Form capture users' Payment info).
  2. through request Get Accept Customer Profile Pagehttps://developer.authorize.net/api/reference/index.html#customer-profiles-get-accept-customer-profile-page getting token.
  3. When the Accept Customer Hosted Form return successful, request Get Customer Profilehttps://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-profile got payment profile id.
  4. Get PaymentProfileID immediately after request Create a Subscription from Customer Profilehttps://developer.authorize.net/api/reference/index.html#recurring-billing-create-a-subscription-from-customer-profile. (The interval between steps 3 and 4 must not exceed 20 seconds)

This problem seems to be caused by data synchronization delay.

My temporary solution is: After getting PaymentProfileID, wait 1 minute to create ARB. This time is usually successful.

What's even worse now is that there is enough data to show that in the third step above, the user information we obtained will often not have paymentProfileID and payment information. (Waiting for 15s before obtaining is usually successful)

@ashtruhttps://github.com/ashtru @chsriniv9https://github.com/chsriniv9

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/AuthorizeNet/sdk-php/issues/284?email_source=notifications&email_token=AN3PGQQQWR625JMN63NY6OLQWXFHXA5CNFSM4EP6C2O2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFX52WA#issuecomment-560979288, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AN3PGQUAEMQVCXQSUKXV2HTQWXFHXANCNFSM4EP6C2OQ.

GodAlmighty990 commented 1 year ago

I spent about 3 days trying to understand why if I create a customerPaymentProfile and then immediately go to create an ARB subscription I get the E00040 error. Who else got dumped off to Authorize.net after Stripe denies your business? IT. IS. 2023. TIME. FOR. UPDATED. DEV. DOCS. CEO of Authorize.net is rated a D boss when you look him up on google.

tashhhh2 commented 1 month ago

2024 same problem and no one is going to solve it

utsavsomaiya commented 2 weeks ago

I have absolutely the same error as @phpstudyone:

#E00040 - The record cannot be found

So the customer profile is created successfully, but I cannot use it immediately: image

I didn't face this error until the previous week.

I found the same temporary solution about the delay after creating new customer profile in that old thread from Authorize.net forum:

There can be a few seconds latency from the time a profile is created until it becomes available for follow-on requests as data replicates. If you wait a few seconds, does the profile data return?

My tests indicate that I have to wait at least 7-8 seconds after creating the new customer profile before I can proceed and set up new subscription without E00040 error. If I'm waiting about 10 seconds, then I can create successfully subscription with that newly created customer profile. However, some random delay is not an acceptable solution for me.

This error persists in both environments: sandbox and production.

My version of the Authorize.net package: authorizenet/authorizenet 1.9.6

I got same issue in laravel app!

GodAlmighty990 commented 2 weeks ago

What an absolute hell of an error too, I wonder how many cumulative days we all wasted ond this issue.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Utsav Somaiya @.> Sent: Thursday, September 5, 2024 6:35:06 AM To: AuthorizeNet/sdk-php @.> Cc: Keith Peiker @.>; Comment @.> Subject: Re: [AuthorizeNet/sdk-php] Create a Subscription from Customer Profile APi can not work. (#284)

I have absolutely the same error as @phpstudyonehttps://github.com/phpstudyone:

E00040 - The record cannot be found

So the customer profile is created successfully, but I cannot use it immediately: [image] https://user-images.githubusercontent.com/8854087/38118079-7a4c12a6-3386-11e8-8afd-0e5bde5dd2cf.png

I didn't face this error until the previous week.

I found the same temporary solution about the delay after creating new customer profile in that old threadhttps://community.developer.authorize.net/t5/Integration-and-Testing/E00040-When-validating-Customer-Payment-Profile/td-p/56066 from Authorize.net forum:

There can be a few seconds latency from the time a profile is created until it becomes available for follow-on requests as data replicates. If you wait a few seconds, does the profile data return?

My tests indicate that I have to wait at least 7-8 seconds after creating the new customer profile before I can proceed and set up new subscription without E00040 error. If I'm waiting about 10 seconds, then I can create successfully subscription with that newly created customer profile. However, some random delay is not an acceptable solution for me.

This error persists in both environments: sandbox and production.

My version of the Authorize.net package: authorizenet/authorizenet 1.9.6

I got same issue in laravel app!

— Reply to this email directly, view it on GitHubhttps://github.com/AuthorizeNet/sdk-php/issues/284#issuecomment-2331460969, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARYH3IN6TYL7MSJXZN7X43LZVBFXVAVCNFSM6AAAAABMQGMMJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZRGQ3DAOJWHE. You are receiving this because you commented.Message ID: @.***>