Changeset 2302622
- Timestamp:
- 05/11/2020 12:17:11 PM (6 years ago)
- Location:
- spektra/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
spektra-wc-gatway.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
spektra/trunk/readme.txt
r2276449 r2302622 68 68 * Prefill customer data from billing details 69 69 70 = 1.0.4 = 71 * Added sub accounts to settings 72 70 73 == Upgrade Notice == 71 74 … … 79 82 Prefill customer data from billing details 80 83 84 = 1.0.1 = 85 Receive Payments in Sub Account 86 81 87 82 88 == Arbitrary section == -
spektra/trunk/spektra-wc-gatway.php
r2276445 r2302622 64 64 $this->private_key = $this->livemode ? $this->get_option( 'private_key' ) : $this->get_option( 'test_private_key' ); 65 65 $this->public_key = $this->livemode ? $this->get_option( 'public_key' ) : $this->get_option( 'test_public_key'); 66 67 $this->sub_account_enabled = $this->get_option( 'sub_account_enabled' ) === 'yes'; 68 $this->sub_account = $this->get_option( 'sub_account' ); 66 69 67 70 if ($this->livemode) { … … 132 135 'description' => 'This is your live private key generated from your Spektra dashboard' 133 136 ), 137 'sub_account_enabled' => array( 138 'title' => 'Use Sub Account', 139 'label' => 'Use Sub Account', 140 'type' => 'checkbox', 141 'description' => 'If enabled, all payments will be received in your sub-account indicated below', 142 'default' => 'no' 143 ), 144 'sub_account' => array( 145 'title' => 'Sub Account', 146 'type' => 'text', 147 'description' => 'Sub Account name from your Spektra dashboard' 148 ), 134 149 'livemode' => array( 135 150 'title' => 'Production mode', … … 246 261 247 262 $order_description = implode(', ', $order_array); 263 264 $sub_account_name = ''; 265 266 if ($this->sub_account_enabled){ 267 if (isset($this->sub_account) && $this->sub_account !== ''){ 268 $sub_account_name = $this->sub_account; 269 } 270 } 248 271 249 272 $postdata ="{ … … 256 279 }, 257 280 \"description\":\"{$order_description}\", 281 \"spektraAccountName\":\"{$sub_account_name}\", 258 282 \"successURL\":\"{$successUrl}\", 259 283 \"cancelURL\":\"{$cancelUrl}\"
Note: See TracChangeset
for help on using the changeset viewer.