Skip to content

Commit ea7e144

Browse files
migrate stripe
1 parent 61482cc commit ea7e144

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

assets/js/cardpayments.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
const STRIPE_PHP_URL = LEGACY_API_URL + '/stripe/prepare_payment.php';
3+
const STRIPE_PREPARE_PAYMENT_URL = API_BASE_URL + '/billing/stripe/payments/prepare';
44

55
class OneTimePayment {
66

@@ -85,7 +85,7 @@ class OneTimePayment {
8585
this._status.success = false;
8686

8787
let preparedPayment = $.ajax({
88-
url: STRIPE_PHP_URL,
88+
url: STRIPE_PREPARE_PAYMENT_URL,
8989
type: 'POST',
9090
data: {
9191
currency: currency,

assets/js/customerportal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
const REQUEST_CUSTOMER_PORTAL_URL = LEGACY_API_URL + '/stripe/request_customer_portal.php';
3+
const REQUEST_CUSTOMER_PORTAL_URL = API_BASE_URL + '/billing/stripe/portal/request-link';
44

55
class CustomerPortal {
66

layouts/partials/donate-creditcard.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
{{ i18n "donate_creditcard_once_paynow" }}
4949
</button>
5050

51-
{{ partial "captcha.html" (dict "captchaPayload" "oneTimePaymentStatus.captcha" "captchaState" "captchaState") }}
51+
{{ $captchaUrl := printf "%s/billing/stripe/payments/challenge" .Site.Params.apiBaseUrl }}
52+
{{ partial "captcha.html" (dict "challengeUrl" $captchaUrl "captchaPayload" "oneTimePaymentStatus.captcha" "captchaState" "captchaState") }}
5253

5354
<p class="text-sm text-red-600 mt-2" x-text="oneTimePaymentStatus.errorMessage"></p>
5455
</div>

0 commit comments

Comments
 (0)