Skip to content

Commit db8d780

Browse files
committed
Started working on payment redirect controller.
pronamic#56
1 parent ce19a4a commit db8d780

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Payments/Payment.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,13 +353,13 @@ public function set_failure_reason( FailureReason $failure_reason = null ) {
353353
*/
354354
public function get_pay_redirect_url() {
355355
$url = add_query_arg(
356-
[
357-
'payment_redirect' => $this->id,
358-
'key' => $this->key,
359-
],
360-
home_url( '/' )
356+
'key',
357+
$this->key,
358+
\rest_url( "/" . pronamic_pay_plugin()->rest_base . "/v1/payments/" .$this->id . "/redirect" )
361359
);
362360

361+
$url = \rest_url( "/" . pronamic_pay_plugin()->rest_base . "/v1/payments/" .$this->id . "/redirect/" . $this->key);
362+
363363
return $url;
364364
}
365365

0 commit comments

Comments
 (0)