4 votes
Accepted

Unable to set planAmount for Charge 2 - Stripe

Developer of Charge here. This error is because you're passing an invalid currency code. You're passing aus as the planCurrency, but need to be passing aud for Australian Dollars. Under the hood, ...
user avatar
4 votes

Charge plugin redirecting to page with "1" on it

I'm the developer of Charge. I've never directly observed that behaviour, but it sounds like it's most likely hitting a redirect failure and falling back to some base success/fail responses. The ...
user avatar
4 votes
Accepted

Charge: Update subscription card details

In the end I worked out the card is related to a customer, not a subscription. I couldn't see any public endpoint to update a customer's card, so I added this method in charge/controllers/...
user avatar
3 votes
Accepted

Charge/Stripe and "Missing required param: exp_month."

I got this resolved by official support. When using the combined date input you'll need to include the exp_month and exp_year inputs as hidden fields in the form. And here's the working hidden ...
user avatar
  • 1,907
3 votes

Webhook Error with Charge plugin

If CSRF protection is enabled (and it is by default for the latest versions of Craft), Stripe was getting a server error when using the Charge webhook url. The solution is to disable CSRF for the ...
user avatar
  • 1,311
3 votes

Booking system based on Charge 2.0

Developer of Charge here. Yes - Charge supports all the native Craft criteria search parameters for fields. Like you mentioned, there are a few special fields that aren't supported currently within ...
user avatar
3 votes
Accepted

Installing the Charge plugin breaks plugin page

So the answer at the bottom of the page here ended up solving my issue. The plugin was using php short array syntax " [ ] " which is available in 5.4 + and the server was set at 5.3.29. When I ...
user avatar
3 votes
Accepted

Is it possible to update a Twig variable based on user interaction without page refresh?

I'm the developer of Charge. You need to go about the form setup a slightly different way. By design there are 2 ways to define the value for a Charge, either Setting the planAmount variable in ...
user avatar
3 votes
Accepted

Using the Charge plugin for membership subscriptions

Developer of Charge here. Setup for installs up to (and including) 2.0.x : The simplest setup would be to use the onBeforeCharge event. This fires at the very start of the charge request, after ...
user avatar
3 votes
Accepted

Where do I put code to use hooks and events from Squarebit's 'Charge' plugin?

You'd listen to Charge's onCharge event just like you'd listen to any of Craft's own events, using a plugin. Your plugin's init() method, for example could do this: craft()->on('charge.onCharge', ...
user avatar
  • 66.5k
2 votes

Charge plugin redirecting to page with "1" on it

I have seen this before - yesterday in fact, with this plugin. But I was messing about trying to get it to report errors back to the calling template from a plugin I was writing. I still don't know ...
user avatar
  • 3,084
2 votes
Accepted

Email Before Membership / Subscription Renews via Charge / Stripe?

Developer of Charge here. While it's not a feature that's currently supported out the box with Charge, it is something that's on the FR list, and is something I'm looking at adding. If you drop me ...
user avatar
2 votes
Accepted

Is it possible to change the default text for a Charge plugin checkout button

Developer of Charge here. Yes - you absolutely can control the label generated for the checkout button. When setting the details for the checkout option, you just need to pass a sub-array called ...
user avatar
2 votes

Charge Pro not sending Subscription Emails

I'm the developer of Charge. The above issue is caused because you're passing in the title of the email, not the handle. We explicitly require the handle to be passed to ensure uniqueness. While the ...
user avatar
2 votes

Charge Pro not sending Subscription Emails

I've actually answered the question in the question. Not sure why it's not showing as is, but the solution is updating the plugin file as mentioned above.
user avatar
  • 131
2 votes
Accepted

Custom action with Charge

You want something like this: craft()->on('charge.onCharge', function($event) { $charge = $event->params['charge']; $pounds = $charge->amount; }
user avatar
2 votes
Accepted

Create Solspace Calendar Event on Commerce onOrderComplete

To listen to Craft Commerce order save event, you must make a new plugin (or use an existing one) and in it's ::init() method, listen to the commerce_orders.onSaveOrder event: class TestPlugin ...
user avatar
  • 1,390
2 votes

Charge plugin not showing errors on payment fail

This is how I got the errors to show: {% if charge is defined and (charge.getErrors or charge.user) %} <div> {% if charge.getErrors %} {% for error in charge.getErrors('...
user avatar
2 votes

Missing required param: card[exp_month] on Charge 2

Add the following hidden inputs below the <input type="text" data-stripe="exp" placeholder="mm / yy" id="cardExpiry"/> line: <input type="hidden" name="cardExpMonth" data-stripe="exp_month"&...
user avatar
  • 226
2 votes

How to hide createAccount select by default • Charge 2 Plugin

Eventually I just edited customerDetails.html and swapped out the select with a hidden field. Done. {{ forms.hidden({ name: 'createAccount', id: 'createAccount', value: 'yes' }) }}
user avatar
2 votes

Charge Model "amount" and "userId" not always populated

I'm pretty sure this issue is caused because the model is being passed to the event without being populated first (it only has the EXACT details that are manually populated when the record is created, ...
user avatar
  • 131
2 votes
Accepted

How do I edit a dropdown field in the charge.onCharge hook?

In your current example, you are not actually saving an entry. You are just setting up an onSaveEntry event listener. To save the entry you will need to actually save the entry using the [saveEntry][1]...
user avatar
2 votes
Accepted

jQuery Validate with Charge plugin

Silly me, this has nothing to do with charge.js, one simply can't have a button with an id="submit" as weird things will happen - see this thread <input type="button" id="otherThanSubmit"> ...
user avatar
  • 545
2 votes

Error declaring TLS Version wrong in Charge plugin

Stripe changed up some API URLs, which threw off Charge's legacy method for detecting TLS compatibility. The erroneous warning is fixed in Charge 2.2.3.
user avatar
  • 3,400
1 vote

Charge plugin not showing errors on payment fail

You have to insert this below your textfields {% if charge is defined %} {% for error in charge.getErrors('FieldNameHere') %} <ul class="errors"><li>{{ error }}</li><...
user avatar
1 vote

Using Charge plugin with Stripe Connect

Developer of Charge here. The full details on the setup for Connect are detailed here : https://squarebit.co.uk/software/craft/charge/usage/reference/connect-setup Setting up a Charge to use ...
user avatar
1 vote
Accepted

Collecting total charge value where custom field is X

Can you not do: {% set total = 0 %} {% for charge in charges %} {% set total = total + charge.amount %} {% endfor %} {{ total|number_format(2, '.', ',') }} ?
user avatar
  • 912
1 vote
Accepted

How could I submit the Charge plugin using Ajax?

You need to specify the HTTP method used by the $.ajax method. By default, it uses GET, but you need to submit the form using POST.
user avatar
1 vote
Accepted

Charge plugin: custom actions on webhooks

So, in order to achieve this I had to make a couple of small hacks to the module core, namely in Charge_ActionsService.php First, I added default case to triggerActionByType function: default : { ...
user avatar
1 vote

Charge plugin: custom actions on webhooks

I don't see events being triggered in the Actions Service (in my version of Charge anyway), so you won't be able to listen for those. You'll most likely have to modify the core, if you do, document ...
user avatar
  • 487

Only top scored, non community-wiki answers of a minimum length are eligible