This bug report is being created after a discussion on Slack with mglaman.
The latest dev release (Oct 10, 2019) is working on the front end but not on the admin side (/admin/commerce/orders/%/payment).
The error in watchdog reads: Square transaction error. category: INVALID_REQUEST_ERROR code: MISSING_REQUIRED_PARAMETER detail: Missing required parameter.
From mglaman:
it looks like the JavaScript isn't mounting right
which.. https://git.drupalcode.org/project/commerce_square/blob/7.x-1.x/commerce...
that's why
that needs to also be in the #attached here commerce_square_payment_method_submit_form
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3087211-6.patch | 2.91 KB | mglaman |
Comments
Comment #2
2ndmile commentedComment #3
mglamanComment #4
mglamanFirst there was #3087422: Prevent possible "SqPaymentForm is not defined", the initial problem. There's also a fatal error that occurs as well.
The
$resultvariable is null.Comment #5
mglamanThis is the problem, the form submit selector:
var $formSubmit = $rootForm.find('#edit-continue[name="op"]');Comment #6
mglamanHere is a patch that should fix admin based payments.
Comment #7
mglamanComment #8
mglamanmaking sure @2ndmile is credited for QA assistance
Comment #10
mglamanThis is fixed!