Sam
Sam

Reputation: 1461

Gravity Forms Stripe subscription only accepting integers

I'm using Gravity Forms with the Stripe add on.

The customer can pick to pay the total in full or over 3 months. When paying over 3 months, the form uses a subscription feed which is then automatically cancelled after 3 payments.

When paying the full amount, Stripe processes the payment perfectly. When selecting to pay over 3 months, it only works when the total amount is an integer e.g. £136. If the total amount is something like: £136.67, it fails and I get the following validation error:

This value must match the regex pattern. (/\A[a-zA-Z0-9_-]+\z/ does not match for the value payover3months_3_1month_136.67).

Can Stripe not process subscriptions unless it's a whole number?

It's also worth noting that I'm using the Ecommerce Gravity Wiz Perk.

The following fields are in use when paying over 3 months:

The form will be working out: Subtotal + 3% Tax - 66.66% Discount = Total. The Discount is in place to divide the subtotal by 3.

Upvotes: 0

Views: 424

Answers (1)

Sam
Sam

Reputation: 1461

It looks like I was running an older version of the Gravity Forms Stripe Add On (2.5). Updating to 2.5.4 addressed the issue.

Gravity Forms support informed me that minor updates are not available for automatics updates via WP Admin. This means you'll need to follow these steps to update:

  1. Select the "Deactivate" option for the plugin you're trying to update
  2. Select the "Delete" option for the plugin you're trying to update
  3. Answer yes when prompted to delete the files. This step deletes the plugin's folder and the files inside.
  4. Select the option to "Add New" plugin
  5. Select "Upload"
  6. Browse to the location where you saved the newly downloaded zip file and select it
  7. Click "Install Now". You should see the message "Plugin installed successfully." This step recreates the plugin's folder and the files inside.
  8. Click "Activate Plugin"

It's important that you DO NOT use the Uninstall [plugin] button in the Forms > Settings area - this will remove your data.

Upvotes: 1

Related Questions