sdk-php icon indicating copy to clipboard operation
sdk-php copied to clipboard

Create a Subscription from Customer Profile APi can not work.

Open phpstudyone opened this issue 7 years ago • 25 comments

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

phpstudyone avatar Feb 09 '18 07:02 phpstudyone

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.

ashtru avatar Mar 26 '18 10:03 ashtru

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.

phpstudyone avatar Mar 27 '18 02:03 phpstudyone

Thanks for the detailed steps for reproduction, @phpstudyOne

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

ashtru avatar Mar 27 '18 06:03 ashtru

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

ashtru avatar Mar 27 '18 06:03 ashtru

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 avatar Mar 27 '18 07:03 phpstudyone

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

phpstudyone avatar Mar 27 '18 11:03 phpstudyone

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 avatar Mar 29 '18 23:03 Lardpower

@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.

Lardpower avatar Jun 14 '18 15:06 Lardpower

@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.

chsriniv9 avatar Jun 15 '18 08:06 chsriniv9

@chsriniv9, thank you.

Lardpower avatar Jun 15 '18 14:06 Lardpower

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.

Lardpower avatar Jan 08 '19 05:01 Lardpower

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

dhcrzf avatar Jan 22 '19 20:01 dhcrzf

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??

adamdew avatar Jun 05 '19 19:06 adamdew

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.

Lardpower avatar Jun 06 '19 02:06 Lardpower

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 avatar Nov 08 '19 10:11 abishekrsrikaanth

@adamdew hopefully ^ helps

abishekrsrikaanth avatar Nov 08 '19 11:11 abishekrsrikaanth

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.

TusharJoy avatar Dec 01 '19 11:12 TusharJoy

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

phpstudyone avatar Dec 03 '19 03:12 phpstudyone

So you know python?

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


From: jason zhang [email protected] Sent: Monday, December 2, 2019 10:14:03 PM To: AuthorizeNet/sdk-php [email protected] Cc: Subscribed [email protected] 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 avatar Dec 03 '19 03:12 Stitrans

How in the hell do I make invoices with this

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


From: jason zhang [email protected] Sent: Monday, December 2, 2019 10:14:03 PM To: AuthorizeNet/sdk-php [email protected] Cc: Subscribed [email protected] 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 avatar Dec 03 '19 04:12 Stitrans

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.

GodAlmighty990 avatar Mar 19 '23 06:03 GodAlmighty990