Changeset 3021631
- Timestamp:
- 01/14/2024 09:15:19 PM (2 years ago)
- Location:
- simple-payment
- Files:
-
- 18 edited
- 1 copied
-
tags/2.3.3 (copied) (copied from simple-payment/trunk)
-
tags/2.3.3/addons/gravityforms/init.php (modified) (5 diffs)
-
tags/2.3.3/addons/woocommerce/init.php (modified) (1 diff)
-
tags/2.3.3/addons/woocommerce/js/simple-payment-woocommerce-checkout.js (modified) (3 diffs)
-
tags/2.3.3/languages/simple-payment.pot (modified) (15 diffs)
-
tags/2.3.3/readme.txt (modified) (1 diff)
-
tags/2.3.3/simple-payment-plugin.php (modified) (3 diffs)
-
tags/2.3.3/vendor/yalla-ya/simple-payment/Engines/PayMe.php (modified) (2 diffs)
-
tags/2.3.3/vendor/yalla-ya/simple-payment/Engines/PayPal.php (modified) (5 diffs)
-
tags/2.3.3/vendor/yalla-ya/simple-payment/Engines/iCount.php (modified) (1 diff)
-
trunk/addons/gravityforms/init.php (modified) (5 diffs)
-
trunk/addons/woocommerce/init.php (modified) (1 diff)
-
trunk/addons/woocommerce/js/simple-payment-woocommerce-checkout.js (modified) (3 diffs)
-
trunk/languages/simple-payment.pot (modified) (15 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/simple-payment-plugin.php (modified) (3 diffs)
-
trunk/vendor/yalla-ya/simple-payment/Engines/PayMe.php (modified) (2 diffs)
-
trunk/vendor/yalla-ya/simple-payment/Engines/PayPal.php (modified) (5 diffs)
-
trunk/vendor/yalla-ya/simple-payment/Engines/iCount.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
simple-payment/tags/2.3.3/addons/gravityforms/init.php
r2881379 r3021631 101 101 } 102 102 103 function get_post_payment_actions_config( $feed_slug ) { 104 return( [ 105 'position' => 'before', 106 'setting' => 'conditionalLogic', 107 ] ); 108 } 109 103 110 function load_scripts( $form, $is_ajax ) { 104 111 if ( $is_ajax ) { … … 464 471 $str = base64_decode( $str ); 465 472 parse_str( $str, $query ); 466 if ( wp_hash( 'ids=' . $query['ids'] ) == $query[ 'hash'] ) {467 list( $form_id, $entry_id ) = explode( '|', $query[ 'ids'] );473 if ( wp_hash( 'ids=' . $query['ids'] ) == $query[ 'hash' ] ) { 474 list( $form_id, $entry_id ) = explode( '|', $query[ 'ids' ] ); 468 475 $form = GFAPI::get_form( $form_id ); 469 476 $entry = GFAPI::get_entry( $entry_id ); … … 511 518 } 512 519 $confirmation = GFFormDisplay::handle_confirmation( $form, $lead, false ); 513 if ( is_array( $confirmation ) && isset( $confirmation[ 'redirect'] ) ) {520 if ( is_array( $confirmation ) && isset( $confirmation[ 'redirect' ] ) ) { 514 521 $url = $confirmation[ 'redirect' ]; 515 522 $target = parse_url( $url, PHP_URL_QUERY ); … … 950 957 $action[ 'type' ] = 'complete_payment'; 951 958 $result = $this->complete_payment( $entry, $action ); 959 if ( method_exists( $this, 'trigger_payment_delayed_feeds' ) ) { 960 $this->trigger_payment_delayed_feeds( $transaction_id, $feed, $entry, GFFormsModel::get_form_meta( $entry['form_id'] ) ); 961 } 952 962 } 953 963 … … 1019 1029 $this->log_debug( __METHOD__ . "(): Form {$entry['form_id']} is properly configured." ); 1020 1030 1031 // TODO: should we check if callback is completed, or ok, 1032 // and rather determine the correct action to call 1033 1021 1034 //----- Processing IPN ------------------------------------------------------------// 1022 1035 $this->log_debug( __METHOD__ . '(): Processing IPN...' ); 1023 1036 $action = []; 1024 $action[ 'transaction_id' ] = $entry[ 'transaction_id'];1025 $action[ 'amount'] = $entry[ 'payment_amount'];1037 $action[ 'transaction_id' ] = $entry[ 'transaction_id' ]; 1038 $action[ 'amount'] = $entry[ 'payment_amount' ]; 1026 1039 $action[ 'payment_method' ] = 'SimplePayment'; 1027 1040 $action[ 'type' ] = 'complete_payment'; -
simple-payment/tags/2.3.3/addons/woocommerce/init.php
r2881379 r3021631 38 38 $url = $order->get_checkout_payment_url( true ); 39 39 $target = '_top'; 40 $SPWP::redirect( $url, $target );40 SimplePaymentPlugin::redirect( $url, $target ); 41 41 die; 42 42 } 43 // TODO: consider using S PWP::redirect()43 // TODO: consider using SimplePaymentPlugin::redirect() 44 44 wp_redirect( $url ); 45 45 die; -
simple-payment/tags/2.3.3/addons/woocommerce/js/simple-payment-woocommerce-checkout.js
r2895596 r3021631 6 6 $checkout_form: $( 'form.checkout' ), 7 7 $form: null, 8 8 $processing: false, 9 9 10 init: function() { 10 11 this.$form = $( document.body ).hasClass( 'woocommerce-order-pay' ) ? $( '#order_review' ) : $( 'form.checkout' ); … … 32 33 if ( !( SimplePayment.params[ 'display' ] == 'iframe' || 33 34 SimplePayment.params[ 'display' ] == 'modal' ) ) return; 34 35 this.processing = true; 35 36 $( document ).ajaxSuccess( SimplePaymentWooCommerce.place_order_success ); 36 37 if ( 'place_order' != this.hook_level ) return; … … 41 42 place_order_success: function( event, xhr, options, result ) { 42 43 //if ( 'place_order_success' !== this.hook_level ) return; 43 if ( 'checkout_place_order_success' !== event.type 44 if ( !this.processing 45 || 'checkout_place_order_success' !== event.type 44 46 || !SimplePayment.params[ 'woocommerce_show_checkout' ] 45 || !( SimplePayment.params[ 'display' ] == 'iframe' || 46 SimplePayment.params[ 'display' ] == 'modal' ) ) return; 47 || !( SimplePayment.params[ 'display' ] == 'iframe' 48 || SimplePayment.params[ 'display' ] == 'modal' ) ) return; 49 this.processing = false; 47 50 //if ( 'checkout_place_order_success' == event.type ) return( true ); // false for checkout error, true to process redirect 48 51 console.log( 'SimplePayment place_order_success - processing' ); -
simple-payment/tags/2.3.3/languages/simple-payment.pot
r2895596 r3021631 1 # Copyright (C) 202 3Ido Kobelkowsky / yalla ya!1 # Copyright (C) 2024 Ido Kobelkowsky / yalla ya! 2 2 # This file is distributed under the GPLv2. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Simple Payment 2.3. 1\n"5 "Project-Id-Version: Simple Payment 2.3.2\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/simple-payment\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-04-07T12:49:35+00:00\n"12 "POT-Creation-Date: 2024-01-14T21:14:40+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.6.0\n" … … 103 103 #: addons/elementor/widget.php:124 104 104 #: addons/elementor/widget.php:147 105 #: addons/gravityforms/init.php:1 75106 #: addons/gravityforms/init.php:37 1105 #: addons/gravityforms/init.php:182 106 #: addons/gravityforms/init.php:378 107 107 #: addons/woocommerce/init.php:258 108 108 #: addons/wpjobboard/config.php:47 … … 143 143 144 144 #: addons/elementor/widget.php:160 145 #: addons/gravityforms/init.php:1 47146 #: addons/gravityforms/init.php:3 28145 #: addons/gravityforms/init.php:154 146 #: addons/gravityforms/init.php:335 147 147 msgid "IFRAME" 148 148 msgstr "" 149 149 150 150 #: addons/elementor/widget.php:161 151 #: addons/gravityforms/init.php:15 1152 #: addons/gravityforms/init.php:33 2151 #: addons/gravityforms/init.php:158 152 #: addons/gravityforms/init.php:339 153 153 msgid "Modal" 154 154 msgstr "" … … 184 184 185 185 #: addons/elementor/widget.php:204 186 #: addons/gravityforms/init.php:13 0187 #: addons/gravityforms/init.php:3 09186 #: addons/gravityforms/init.php:137 187 #: addons/gravityforms/init.php:316 188 188 #: addons/woocommerce/init.php:203 189 189 #: addons/wpjobboard/config.php:12 … … 198 198 199 199 #: addons/elementor/widget.php:221 200 #: addons/gravityforms/init.php:1 63201 #: addons/gravityforms/init.php:3 44200 #: addons/gravityforms/init.php:170 201 #: addons/gravityforms/init.php:351 202 202 #: addons/woocommerce/init.php:159 203 203 #: addons/woocommerce/init.php:250 … … 225 225 msgstr "" 226 226 227 #: addons/gravityforms/init.php:1 18227 #: addons/gravityforms/init.php:125 228 228 msgid "Simple Payment is a merchant account and gateway in one. Use Gravity Forms to collect payment information and automatically integrate to your Simple Payment account. If you don't have a Simple Payment account, you can %ssign up for one here.%s" 229 229 msgstr "" 230 230 231 #: addons/gravityforms/init.php:13 2232 #: addons/gravityforms/init.php:31 2231 #: addons/gravityforms/init.php:139 232 #: addons/gravityforms/init.php:319 233 233 #: addons/woocommerce/init.php:205 234 234 msgid "Select Payment Gateway" 235 235 msgstr "" 236 236 237 #: addons/gravityforms/init.php:13 2238 #: addons/gravityforms/init.php:31 2237 #: addons/gravityforms/init.php:139 238 #: addons/gravityforms/init.php:319 239 239 msgid "If none selected it will use Simple Payment default" 240 240 msgstr "" 241 241 242 #: addons/gravityforms/init.php:1 38243 #: addons/gravityforms/init.php:14 0244 #: addons/gravityforms/init.php:3 18245 #: addons/gravityforms/init.php:32 1242 #: addons/gravityforms/init.php:145 243 #: addons/gravityforms/init.php:147 244 #: addons/gravityforms/init.php:325 245 #: addons/gravityforms/init.php:328 246 246 #: addons/woocommerce/init.php:217 247 247 #: addons/woocommerce/init.php:219 … … 250 250 msgstr "" 251 251 252 #: addons/gravityforms/init.php:14 0253 #: addons/gravityforms/init.php:32 1252 #: addons/gravityforms/init.php:147 253 #: addons/gravityforms/init.php:328 254 254 #: addons/woocommerce/init.php:206 255 255 #: addons/woocommerce/init.php:220 … … 259 259 msgstr "" 260 260 261 #: addons/gravityforms/init.php:1 43262 #: addons/gravityforms/init.php:3 24261 #: addons/gravityforms/init.php:150 262 #: addons/gravityforms/init.php:331 263 263 #: addons/wpjobboard/config.php:6 264 264 msgid "Default" 265 265 msgstr "" 266 266 267 #: addons/gravityforms/init.php:1 55268 #: addons/gravityforms/init.php:3 36267 #: addons/gravityforms/init.php:162 268 #: addons/gravityforms/init.php:343 269 269 msgid "redirect" 270 270 msgstr "" 271 271 272 #: addons/gravityforms/init.php:1 65273 #: addons/gravityforms/init.php:3 47272 #: addons/gravityforms/init.php:172 273 #: addons/gravityforms/init.php:354 274 274 #: addons/woocommerce/init.php:252 275 275 msgid "Enable Insallments" 276 276 msgstr "" 277 277 278 #: addons/gravityforms/init.php:1 65279 #: addons/gravityforms/init.php:3 47278 #: addons/gravityforms/init.php:172 279 #: addons/gravityforms/init.php:354 280 280 msgid "Enable installments on checkout page." 281 281 msgstr "" 282 282 283 #: addons/gravityforms/init.php:1 78284 #: addons/gravityforms/init.php:3 75283 #: addons/gravityforms/init.php:185 284 #: addons/gravityforms/init.php:382 285 285 #: addons/woocommerce/init.php:260 286 286 #: addons/wpjobboard/config.php:48 … … 288 288 msgstr "" 289 289 290 #: addons/gravityforms/init.php:1 78291 #: addons/gravityforms/init.php:3 75290 #: addons/gravityforms/init.php:185 291 #: addons/gravityforms/init.php:382 292 292 #: addons/woocommerce/init.php:261 293 293 msgid "If you wish to use a custom form template." 294 294 msgstr "" 295 295 296 #: addons/gravityforms/init.php:18 2297 #: addons/gravityforms/init.php:3 79296 #: addons/gravityforms/init.php:189 297 #: addons/gravityforms/init.php:386 298 298 #: addons/woocommerce/init.php:266 299 299 #: addons/wpjobboard/config.php:53 … … 301 301 msgstr "" 302 302 303 #: addons/gravityforms/init.php:1 85304 #: addons/gravityforms/init.php:3 83303 #: addons/gravityforms/init.php:192 304 #: addons/gravityforms/init.php:390 305 305 #: addons/woocommerce/init.php:268 306 306 #: addons/wpjobboard/config.php:54 … … 308 308 msgstr "" 309 309 310 #: addons/gravityforms/init.php:1 85311 #: addons/gravityforms/init.php:3 83310 #: addons/gravityforms/init.php:192 311 #: addons/gravityforms/init.php:390 312 312 #: addons/woocommerce/init.php:269 313 313 msgid "Use if carefully" 314 314 msgstr "" 315 315 316 #: addons/gravityforms/init.php:224 316 #: addons/gravityforms/init.php:231 317 #: addons/gravityforms/init.php:243 318 msgid "Pay Period" 319 msgstr "" 320 321 #: addons/gravityforms/init.php:234 322 msgid "Weekly" 323 msgstr "" 324 325 #: addons/gravityforms/init.php:235 326 msgid "Every Two Weeks" 327 msgstr "" 328 317 329 #: addons/gravityforms/init.php:236 318 msgid "Pay Period"319 msgstr ""320 321 #: addons/gravityforms/init.php:227322 msgid "Weekly"323 msgstr ""324 325 #: addons/gravityforms/init.php:228326 msgid "Every Two Weeks"327 msgstr ""328 329 #: addons/gravityforms/init.php:229330 330 msgid "Twice Every Month" 331 331 msgstr "" 332 332 333 #: addons/gravityforms/init.php:23 0333 #: addons/gravityforms/init.php:237 334 334 msgid "Every Four Weeks" 335 335 msgstr "" 336 336 337 #: addons/gravityforms/init.php:23 1337 #: addons/gravityforms/init.php:238 338 338 msgid "Monthly" 339 339 msgstr "" 340 340 341 #: addons/gravityforms/init.php:23 2341 #: addons/gravityforms/init.php:239 342 342 msgid "Quarterly" 343 343 msgstr "" 344 344 345 #: addons/gravityforms/init.php:2 33345 #: addons/gravityforms/init.php:240 346 346 msgid "Twice Every Year" 347 347 msgstr "" 348 348 349 #: addons/gravityforms/init.php:2 34349 #: addons/gravityforms/init.php:241 350 350 msgid "Yearly" 351 351 msgstr "" 352 352 353 #: addons/gravityforms/init.php:2 36353 #: addons/gravityforms/init.php:243 354 354 msgid "Select pay period. This determines how often the recurring payment should occur." 355 355 msgstr "" 356 356 357 #: addons/gravityforms/init.php:2 46358 #: addons/gravityforms/init.php:2 48357 #: addons/gravityforms/init.php:253 358 #: addons/gravityforms/init.php:255 359 359 msgid "Posts" 360 360 msgstr "" 361 361 362 #: addons/gravityforms/init.php:2 48362 #: addons/gravityforms/init.php:255 363 363 msgid "Enable this option if you would like to change the post status when a subscription is cancelled." 364 364 msgstr "" 365 365 366 #: addons/gravityforms/init.php:25 1366 #: addons/gravityforms/init.php:258 367 367 msgid "Update Post when subscription is cancelled." 368 368 msgstr "" 369 369 370 #: addons/gravityforms/init.php:2 66371 #: addons/gravityforms/init.php:2 68370 #: addons/gravityforms/init.php:273 371 #: addons/gravityforms/init.php:275 372 372 msgid "Custom Settings" 373 373 msgstr "" 374 374 375 #: addons/gravityforms/init.php:2 68375 #: addons/gravityforms/init.php:275 376 376 msgid "Override the settings provided on the Simple Payment Settings page and use these instead for this feed." 377 377 msgstr "" 378 378 379 #: addons/gravityforms/init.php:3 57379 #: addons/gravityforms/init.php:364 380 380 msgid "Multi-line Documents" 381 381 msgstr "" 382 382 383 #: addons/gravityforms/init.php:36 1383 #: addons/gravityforms/init.php:368 384 384 msgid "Where possible issue receipt with products details" 385 385 msgstr "" 386 386 387 #: addons/gravityforms/init.php:36 1387 #: addons/gravityforms/init.php:368 388 388 msgid "When receipt details is requried." 389 389 msgstr "" 390 390 391 #: addons/gravityforms/init.php:4 06391 #: addons/gravityforms/init.php:413 392 392 msgid "Mark Post as Draft" 393 393 msgstr "" 394 394 395 #: addons/gravityforms/init.php:4 07395 #: addons/gravityforms/init.php:414 396 396 msgid "Delete Post" 397 397 msgstr "" 398 398 399 #: addons/gravityforms/init.php:4 26399 #: addons/gravityforms/init.php:433 400 400 msgid "Last Name" 401 401 msgstr "" 402 402 403 #: addons/gravityforms/init.php:43 1403 #: addons/gravityforms/init.php:438 404 404 msgid "First Name" 405 405 msgstr "" 406 406 407 #: addons/gravityforms/init.php:4 36407 #: addons/gravityforms/init.php:443 408 408 #: templates/form-bootstrap.php:36 409 409 #: templates/form-cardcom-example.php:36 … … 413 413 msgstr "" 414 414 415 #: addons/gravityforms/init.php:44 1415 #: addons/gravityforms/init.php:448 416 416 msgid "Company" 417 417 msgstr "" 418 418 419 #: addons/gravityforms/init.php:4 46419 #: addons/gravityforms/init.php:453 420 420 msgid "Product Code" 421 421 msgstr "" 422 422 423 #: addons/gravityforms/init.php:9 60423 #: addons/gravityforms/init.php:970 424 424 msgid "Payment Completed" 425 425 msgstr "" 426 426 427 #: addons/gravityforms/init.php:9 61427 #: addons/gravityforms/init.php:971 428 428 msgid "Payment Failed" 429 429 msgstr "" 430 430 431 #: addons/gravityforms/init.php:9 62431 #: addons/gravityforms/init.php:972 432 432 msgid "Subscription Created" 433 433 msgstr "" 434 434 435 #: addons/gravityforms/init.php:13 59435 #: addons/gravityforms/init.php:1372 436 436 #: addons/woocommerce/init.php:143 437 437 #: templates/form-woocommerce.php:65 … … 1664 1664 1665 1665 #: simple-payment-plugin.php:395 1666 #: simple-payment-plugin.php:396 1666 1667 msgid "Transaction Details" 1667 1668 msgstr "" … … 1699 1700 msgstr "" 1700 1701 1701 #: simple-payment-plugin.php:125 21702 #: simple-payment-plugin.php:1251 1702 1703 msgid "Couldn't update transaction: %s" 1703 1704 msgstr "" -
simple-payment/tags/2.3.3/readme.txt
r2895596 r3021631 4 4 Tags: credit card, simple payment, donation, membership, checkout, payment request, payment gateway, sales, woocommerce, store, ecommerce, e-commerce, commerce, gutenberg, elementor, cardcom, icount, icredit, payme, isracard, paypal 5 5 Requires at least: 4.6 6 Tested up to: 6. 2.07 Stable tag: 2.3. 26 Tested up to: 6.4 7 Stable tag: 2.3.3 8 8 Requires PHP: 5.4 9 9 License: GPLv2 or later -
simple-payment/tags/2.3.3/simple-payment-plugin.php
r2895596 r3021631 4 4 * Plugin URI: https://simple-payment.yalla-ya.com 5 5 * Description: Simple Payment enables integration with multiple payment gateways, and customize multiple payment forms. 6 * Version: 2.3. 26 * Version: 2.3.3 7 7 * Author: Ido Kobelkowsky / yalla ya! 8 8 * Author URI: https://github.com/idokd … … 392 392 add_action( "load-$hook", [$this, 'transactions'] ); 393 393 394 $hook = add_submenu_page( null,395 __( 'Transaction Details', 'simple-payment'),396 null,394 $hook = add_submenu_page( 'simple-payments', 395 __( 'Transaction Details', 'simple-payment' ), 396 __ ('Transaction Details', 'simple-payment' ), 397 397 'manage_options', 398 398 'simple-payments-details', 399 [ $this, 'render_transaction_log']399 [ $this, 'render_transaction_log' ] 400 400 ); 401 401 add_action( "load-$hook", [$this, 'info'] ); … … 855 855 if ( isset( $_REQUEST[ 'payment_id' ] ) && $_REQUEST[ 'payment_id' ] ) $params = array_merge( $this->fetch( $_REQUEST[ 'payment_id' ] ), $_REQUEST ); 856 856 else $params = $_REQUEST; 857 print $url;858 857 $this->post_process( $params, $engine ); 859 858 do_action( 'sp_payment_success', $params ); -
simple-payment/tags/2.3.3/vendor/yalla-ya/simple-payment/Engines/PayMe.php
r2881379 r3021631 132 132 $json = [ 133 133 'seller_payme_id' => $this->password, 134 'sale_price' => str_replace('.', '', $params['amount']),134 'sale_price' => intval( $params[ 'amount' ] * 100 ), 135 135 'currency' => $currency, 136 'product_name' => $params[ 'product'],136 'product_name' => $params[ 'product' ], 137 137 'installments' => 1, // 103 {min}{max} 138 138 'sale_callback_url' => $this->url(SimplePayment::OPERATION_STATUS, $params), 139 139 'sale_return_url' => $this->url(SimplePayment::OPERATION_SUCCESS, $params), 140 'capture_buyer' => 1,141 140 'language' => $language 142 141 ]; … … 149 148 150 149 $json['sale_send_notification'] = $this->param('notify') ? 1 : 0; 151 if (isset($params[SimplePayment::METHOD]) && $params[SimplePayment::METHOD]) $json['sale_payment_method'] = $params[SimplePayment::METHOD]; 150 $method = isset( $params[ SimplePayment::METHOD ] ) ? $params[ SimplePayment::METHOD ] : 'credit-card'; 151 if ( $method ) { 152 $json[ 'sale_payment_method' ] = $method; 153 } 154 155 switch( $method ) { 156 case 'credit-card': 157 $json[ 'capture_buyer' ] = 1; 158 $operation = 'capture-sale'; 159 break; 160 default: 161 $operation = 'generate-sale'; 162 } 152 163 153 164 // market_fee , capture_buyer 154 165 // for tokenization: buyer_key 155 166 156 $status = $this->post($this->api[ 'capture-sale'], json_encode($json), [ 'Content-Type: application/json' ], false);167 $status = $this->post($this->api[ $operation ], json_encode($json), [ 'Content-Type: application/json' ], false); 157 168 $status = json_decode($status, true); 158 169 $status['url'] = $status['sale_url']; -
simple-payment/tags/2.3.3/vendor/yalla-ya/simple-payment/Engines/PayPal.php
r2730843 r3021631 29 29 public $context; 30 30 public $clientId; 31 32 public static $domains = [ 33 'paypal.com', 34 'www.paypal.com' 35 ]; 31 36 32 37 public function __construct($params = null, $handler = null, $sandbox = true) { … … 63 68 64 69 public function process($params) { 65 if ($this->context) { 66 header("Location: ".$params['url']); 67 return(true); 70 if ( $this->context ) { 71 return( $params[ 'url' ] ); 68 72 } 69 $post = $params[ 'post'];73 $post = $params[ 'post' ]; 70 74 // Process the transaction, for example 71 75 // - Call payment gateway API … … 91 95 if ($this->context) { 92 96 $payer = new Payer(); 93 $payer->setPaymentMethod("paypal"); // $this->param('paypal_method') 94 $item = new Item(); 95 $item->setName($concept)->setCurrency($currency)->setQuantity(1)->setPrice($amount); 97 $payer->setPaymentMethod( 'paypal' ); // $this->param('paypal_method') 98 $item = ( new Item() )->setName( $concept ) 99 ->setCurrency( $currency ) 100 ->setQuantity( 1 ) 101 ->setPrice( $amount ); 96 102 $list = new ItemList(); 97 103 $list->setItems(array($item)); … … 146 152 147 153 } 148 $params[ 'post'] = $post;154 $params[ 'post' ] = $post; 149 155 150 $post[ 'url'] = $this->sandbox ? $this->api['sandbox']['post'] : $this->api['post'];156 $post[ 'url' ] = $this->sandbox ? $this->api['sandbox']['post'] : $this->api['post']; 151 157 $this->save([ 152 158 'transaction_id' => $this->transaction, … … 154 160 'status' => null, 155 161 'description' => 'Express Checkout', 156 'request' => json_encode( $post),162 'request' => json_encode( $params ), 157 163 'response' => null 158 164 ]); 159 return( $params);165 return( $params ); 160 166 } 161 167 -
simple-payment/tags/2.3.3/vendor/yalla-ya/simple-payment/Engines/iCount.php
r2881379 r3021631 227 227 $post['cc_validity'] = $params[ SimplePayment::CARD_EXPIRY_YEAR ] . '-' . $params[ SimplePayment::CARD_EXPIRY_MONTH ]; 228 228 $post['cc_holder_name'] = $params[SimplePayment::CARD_OWNER]; 229 if ( isset($params[SimplePayment::CARD_OWNER_ID])) $post['cc_holder_id'] = $params[SimplePayment::CARD_OWNER_ID];229 if ( isset( $params[ SimplePayment::CARD_OWNER_ID ] ) ) $post[ 'cc_holder_id' ] = $params[ SimplePayment::CARD_OWNER_ID ]; 230 230 } 231 231 } else { -
simple-payment/trunk/addons/gravityforms/init.php
r2881379 r3021631 101 101 } 102 102 103 function get_post_payment_actions_config( $feed_slug ) { 104 return( [ 105 'position' => 'before', 106 'setting' => 'conditionalLogic', 107 ] ); 108 } 109 103 110 function load_scripts( $form, $is_ajax ) { 104 111 if ( $is_ajax ) { … … 464 471 $str = base64_decode( $str ); 465 472 parse_str( $str, $query ); 466 if ( wp_hash( 'ids=' . $query['ids'] ) == $query[ 'hash'] ) {467 list( $form_id, $entry_id ) = explode( '|', $query[ 'ids'] );473 if ( wp_hash( 'ids=' . $query['ids'] ) == $query[ 'hash' ] ) { 474 list( $form_id, $entry_id ) = explode( '|', $query[ 'ids' ] ); 468 475 $form = GFAPI::get_form( $form_id ); 469 476 $entry = GFAPI::get_entry( $entry_id ); … … 511 518 } 512 519 $confirmation = GFFormDisplay::handle_confirmation( $form, $lead, false ); 513 if ( is_array( $confirmation ) && isset( $confirmation[ 'redirect'] ) ) {520 if ( is_array( $confirmation ) && isset( $confirmation[ 'redirect' ] ) ) { 514 521 $url = $confirmation[ 'redirect' ]; 515 522 $target = parse_url( $url, PHP_URL_QUERY ); … … 950 957 $action[ 'type' ] = 'complete_payment'; 951 958 $result = $this->complete_payment( $entry, $action ); 959 if ( method_exists( $this, 'trigger_payment_delayed_feeds' ) ) { 960 $this->trigger_payment_delayed_feeds( $transaction_id, $feed, $entry, GFFormsModel::get_form_meta( $entry['form_id'] ) ); 961 } 952 962 } 953 963 … … 1019 1029 $this->log_debug( __METHOD__ . "(): Form {$entry['form_id']} is properly configured." ); 1020 1030 1031 // TODO: should we check if callback is completed, or ok, 1032 // and rather determine the correct action to call 1033 1021 1034 //----- Processing IPN ------------------------------------------------------------// 1022 1035 $this->log_debug( __METHOD__ . '(): Processing IPN...' ); 1023 1036 $action = []; 1024 $action[ 'transaction_id' ] = $entry[ 'transaction_id'];1025 $action[ 'amount'] = $entry[ 'payment_amount'];1037 $action[ 'transaction_id' ] = $entry[ 'transaction_id' ]; 1038 $action[ 'amount'] = $entry[ 'payment_amount' ]; 1026 1039 $action[ 'payment_method' ] = 'SimplePayment'; 1027 1040 $action[ 'type' ] = 'complete_payment'; -
simple-payment/trunk/addons/woocommerce/init.php
r2881379 r3021631 38 38 $url = $order->get_checkout_payment_url( true ); 39 39 $target = '_top'; 40 $SPWP::redirect( $url, $target );40 SimplePaymentPlugin::redirect( $url, $target ); 41 41 die; 42 42 } 43 // TODO: consider using S PWP::redirect()43 // TODO: consider using SimplePaymentPlugin::redirect() 44 44 wp_redirect( $url ); 45 45 die; -
simple-payment/trunk/addons/woocommerce/js/simple-payment-woocommerce-checkout.js
r2895596 r3021631 6 6 $checkout_form: $( 'form.checkout' ), 7 7 $form: null, 8 8 $processing: false, 9 9 10 init: function() { 10 11 this.$form = $( document.body ).hasClass( 'woocommerce-order-pay' ) ? $( '#order_review' ) : $( 'form.checkout' ); … … 32 33 if ( !( SimplePayment.params[ 'display' ] == 'iframe' || 33 34 SimplePayment.params[ 'display' ] == 'modal' ) ) return; 34 35 this.processing = true; 35 36 $( document ).ajaxSuccess( SimplePaymentWooCommerce.place_order_success ); 36 37 if ( 'place_order' != this.hook_level ) return; … … 41 42 place_order_success: function( event, xhr, options, result ) { 42 43 //if ( 'place_order_success' !== this.hook_level ) return; 43 if ( 'checkout_place_order_success' !== event.type 44 if ( !this.processing 45 || 'checkout_place_order_success' !== event.type 44 46 || !SimplePayment.params[ 'woocommerce_show_checkout' ] 45 || !( SimplePayment.params[ 'display' ] == 'iframe' || 46 SimplePayment.params[ 'display' ] == 'modal' ) ) return; 47 || !( SimplePayment.params[ 'display' ] == 'iframe' 48 || SimplePayment.params[ 'display' ] == 'modal' ) ) return; 49 this.processing = false; 47 50 //if ( 'checkout_place_order_success' == event.type ) return( true ); // false for checkout error, true to process redirect 48 51 console.log( 'SimplePayment place_order_success - processing' ); -
simple-payment/trunk/languages/simple-payment.pot
r2895596 r3021631 1 # Copyright (C) 202 3Ido Kobelkowsky / yalla ya!1 # Copyright (C) 2024 Ido Kobelkowsky / yalla ya! 2 2 # This file is distributed under the GPLv2. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Simple Payment 2.3. 1\n"5 "Project-Id-Version: Simple Payment 2.3.2\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/simple-payment\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-04-07T12:49:35+00:00\n"12 "POT-Creation-Date: 2024-01-14T21:14:40+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.6.0\n" … … 103 103 #: addons/elementor/widget.php:124 104 104 #: addons/elementor/widget.php:147 105 #: addons/gravityforms/init.php:1 75106 #: addons/gravityforms/init.php:37 1105 #: addons/gravityforms/init.php:182 106 #: addons/gravityforms/init.php:378 107 107 #: addons/woocommerce/init.php:258 108 108 #: addons/wpjobboard/config.php:47 … … 143 143 144 144 #: addons/elementor/widget.php:160 145 #: addons/gravityforms/init.php:1 47146 #: addons/gravityforms/init.php:3 28145 #: addons/gravityforms/init.php:154 146 #: addons/gravityforms/init.php:335 147 147 msgid "IFRAME" 148 148 msgstr "" 149 149 150 150 #: addons/elementor/widget.php:161 151 #: addons/gravityforms/init.php:15 1152 #: addons/gravityforms/init.php:33 2151 #: addons/gravityforms/init.php:158 152 #: addons/gravityforms/init.php:339 153 153 msgid "Modal" 154 154 msgstr "" … … 184 184 185 185 #: addons/elementor/widget.php:204 186 #: addons/gravityforms/init.php:13 0187 #: addons/gravityforms/init.php:3 09186 #: addons/gravityforms/init.php:137 187 #: addons/gravityforms/init.php:316 188 188 #: addons/woocommerce/init.php:203 189 189 #: addons/wpjobboard/config.php:12 … … 198 198 199 199 #: addons/elementor/widget.php:221 200 #: addons/gravityforms/init.php:1 63201 #: addons/gravityforms/init.php:3 44200 #: addons/gravityforms/init.php:170 201 #: addons/gravityforms/init.php:351 202 202 #: addons/woocommerce/init.php:159 203 203 #: addons/woocommerce/init.php:250 … … 225 225 msgstr "" 226 226 227 #: addons/gravityforms/init.php:1 18227 #: addons/gravityforms/init.php:125 228 228 msgid "Simple Payment is a merchant account and gateway in one. Use Gravity Forms to collect payment information and automatically integrate to your Simple Payment account. If you don't have a Simple Payment account, you can %ssign up for one here.%s" 229 229 msgstr "" 230 230 231 #: addons/gravityforms/init.php:13 2232 #: addons/gravityforms/init.php:31 2231 #: addons/gravityforms/init.php:139 232 #: addons/gravityforms/init.php:319 233 233 #: addons/woocommerce/init.php:205 234 234 msgid "Select Payment Gateway" 235 235 msgstr "" 236 236 237 #: addons/gravityforms/init.php:13 2238 #: addons/gravityforms/init.php:31 2237 #: addons/gravityforms/init.php:139 238 #: addons/gravityforms/init.php:319 239 239 msgid "If none selected it will use Simple Payment default" 240 240 msgstr "" 241 241 242 #: addons/gravityforms/init.php:1 38243 #: addons/gravityforms/init.php:14 0244 #: addons/gravityforms/init.php:3 18245 #: addons/gravityforms/init.php:32 1242 #: addons/gravityforms/init.php:145 243 #: addons/gravityforms/init.php:147 244 #: addons/gravityforms/init.php:325 245 #: addons/gravityforms/init.php:328 246 246 #: addons/woocommerce/init.php:217 247 247 #: addons/woocommerce/init.php:219 … … 250 250 msgstr "" 251 251 252 #: addons/gravityforms/init.php:14 0253 #: addons/gravityforms/init.php:32 1252 #: addons/gravityforms/init.php:147 253 #: addons/gravityforms/init.php:328 254 254 #: addons/woocommerce/init.php:206 255 255 #: addons/woocommerce/init.php:220 … … 259 259 msgstr "" 260 260 261 #: addons/gravityforms/init.php:1 43262 #: addons/gravityforms/init.php:3 24261 #: addons/gravityforms/init.php:150 262 #: addons/gravityforms/init.php:331 263 263 #: addons/wpjobboard/config.php:6 264 264 msgid "Default" 265 265 msgstr "" 266 266 267 #: addons/gravityforms/init.php:1 55268 #: addons/gravityforms/init.php:3 36267 #: addons/gravityforms/init.php:162 268 #: addons/gravityforms/init.php:343 269 269 msgid "redirect" 270 270 msgstr "" 271 271 272 #: addons/gravityforms/init.php:1 65273 #: addons/gravityforms/init.php:3 47272 #: addons/gravityforms/init.php:172 273 #: addons/gravityforms/init.php:354 274 274 #: addons/woocommerce/init.php:252 275 275 msgid "Enable Insallments" 276 276 msgstr "" 277 277 278 #: addons/gravityforms/init.php:1 65279 #: addons/gravityforms/init.php:3 47278 #: addons/gravityforms/init.php:172 279 #: addons/gravityforms/init.php:354 280 280 msgid "Enable installments on checkout page." 281 281 msgstr "" 282 282 283 #: addons/gravityforms/init.php:1 78284 #: addons/gravityforms/init.php:3 75283 #: addons/gravityforms/init.php:185 284 #: addons/gravityforms/init.php:382 285 285 #: addons/woocommerce/init.php:260 286 286 #: addons/wpjobboard/config.php:48 … … 288 288 msgstr "" 289 289 290 #: addons/gravityforms/init.php:1 78291 #: addons/gravityforms/init.php:3 75290 #: addons/gravityforms/init.php:185 291 #: addons/gravityforms/init.php:382 292 292 #: addons/woocommerce/init.php:261 293 293 msgid "If you wish to use a custom form template." 294 294 msgstr "" 295 295 296 #: addons/gravityforms/init.php:18 2297 #: addons/gravityforms/init.php:3 79296 #: addons/gravityforms/init.php:189 297 #: addons/gravityforms/init.php:386 298 298 #: addons/woocommerce/init.php:266 299 299 #: addons/wpjobboard/config.php:53 … … 301 301 msgstr "" 302 302 303 #: addons/gravityforms/init.php:1 85304 #: addons/gravityforms/init.php:3 83303 #: addons/gravityforms/init.php:192 304 #: addons/gravityforms/init.php:390 305 305 #: addons/woocommerce/init.php:268 306 306 #: addons/wpjobboard/config.php:54 … … 308 308 msgstr "" 309 309 310 #: addons/gravityforms/init.php:1 85311 #: addons/gravityforms/init.php:3 83310 #: addons/gravityforms/init.php:192 311 #: addons/gravityforms/init.php:390 312 312 #: addons/woocommerce/init.php:269 313 313 msgid "Use if carefully" 314 314 msgstr "" 315 315 316 #: addons/gravityforms/init.php:224 316 #: addons/gravityforms/init.php:231 317 #: addons/gravityforms/init.php:243 318 msgid "Pay Period" 319 msgstr "" 320 321 #: addons/gravityforms/init.php:234 322 msgid "Weekly" 323 msgstr "" 324 325 #: addons/gravityforms/init.php:235 326 msgid "Every Two Weeks" 327 msgstr "" 328 317 329 #: addons/gravityforms/init.php:236 318 msgid "Pay Period"319 msgstr ""320 321 #: addons/gravityforms/init.php:227322 msgid "Weekly"323 msgstr ""324 325 #: addons/gravityforms/init.php:228326 msgid "Every Two Weeks"327 msgstr ""328 329 #: addons/gravityforms/init.php:229330 330 msgid "Twice Every Month" 331 331 msgstr "" 332 332 333 #: addons/gravityforms/init.php:23 0333 #: addons/gravityforms/init.php:237 334 334 msgid "Every Four Weeks" 335 335 msgstr "" 336 336 337 #: addons/gravityforms/init.php:23 1337 #: addons/gravityforms/init.php:238 338 338 msgid "Monthly" 339 339 msgstr "" 340 340 341 #: addons/gravityforms/init.php:23 2341 #: addons/gravityforms/init.php:239 342 342 msgid "Quarterly" 343 343 msgstr "" 344 344 345 #: addons/gravityforms/init.php:2 33345 #: addons/gravityforms/init.php:240 346 346 msgid "Twice Every Year" 347 347 msgstr "" 348 348 349 #: addons/gravityforms/init.php:2 34349 #: addons/gravityforms/init.php:241 350 350 msgid "Yearly" 351 351 msgstr "" 352 352 353 #: addons/gravityforms/init.php:2 36353 #: addons/gravityforms/init.php:243 354 354 msgid "Select pay period. This determines how often the recurring payment should occur." 355 355 msgstr "" 356 356 357 #: addons/gravityforms/init.php:2 46358 #: addons/gravityforms/init.php:2 48357 #: addons/gravityforms/init.php:253 358 #: addons/gravityforms/init.php:255 359 359 msgid "Posts" 360 360 msgstr "" 361 361 362 #: addons/gravityforms/init.php:2 48362 #: addons/gravityforms/init.php:255 363 363 msgid "Enable this option if you would like to change the post status when a subscription is cancelled." 364 364 msgstr "" 365 365 366 #: addons/gravityforms/init.php:25 1366 #: addons/gravityforms/init.php:258 367 367 msgid "Update Post when subscription is cancelled." 368 368 msgstr "" 369 369 370 #: addons/gravityforms/init.php:2 66371 #: addons/gravityforms/init.php:2 68370 #: addons/gravityforms/init.php:273 371 #: addons/gravityforms/init.php:275 372 372 msgid "Custom Settings" 373 373 msgstr "" 374 374 375 #: addons/gravityforms/init.php:2 68375 #: addons/gravityforms/init.php:275 376 376 msgid "Override the settings provided on the Simple Payment Settings page and use these instead for this feed." 377 377 msgstr "" 378 378 379 #: addons/gravityforms/init.php:3 57379 #: addons/gravityforms/init.php:364 380 380 msgid "Multi-line Documents" 381 381 msgstr "" 382 382 383 #: addons/gravityforms/init.php:36 1383 #: addons/gravityforms/init.php:368 384 384 msgid "Where possible issue receipt with products details" 385 385 msgstr "" 386 386 387 #: addons/gravityforms/init.php:36 1387 #: addons/gravityforms/init.php:368 388 388 msgid "When receipt details is requried." 389 389 msgstr "" 390 390 391 #: addons/gravityforms/init.php:4 06391 #: addons/gravityforms/init.php:413 392 392 msgid "Mark Post as Draft" 393 393 msgstr "" 394 394 395 #: addons/gravityforms/init.php:4 07395 #: addons/gravityforms/init.php:414 396 396 msgid "Delete Post" 397 397 msgstr "" 398 398 399 #: addons/gravityforms/init.php:4 26399 #: addons/gravityforms/init.php:433 400 400 msgid "Last Name" 401 401 msgstr "" 402 402 403 #: addons/gravityforms/init.php:43 1403 #: addons/gravityforms/init.php:438 404 404 msgid "First Name" 405 405 msgstr "" 406 406 407 #: addons/gravityforms/init.php:4 36407 #: addons/gravityforms/init.php:443 408 408 #: templates/form-bootstrap.php:36 409 409 #: templates/form-cardcom-example.php:36 … … 413 413 msgstr "" 414 414 415 #: addons/gravityforms/init.php:44 1415 #: addons/gravityforms/init.php:448 416 416 msgid "Company" 417 417 msgstr "" 418 418 419 #: addons/gravityforms/init.php:4 46419 #: addons/gravityforms/init.php:453 420 420 msgid "Product Code" 421 421 msgstr "" 422 422 423 #: addons/gravityforms/init.php:9 60423 #: addons/gravityforms/init.php:970 424 424 msgid "Payment Completed" 425 425 msgstr "" 426 426 427 #: addons/gravityforms/init.php:9 61427 #: addons/gravityforms/init.php:971 428 428 msgid "Payment Failed" 429 429 msgstr "" 430 430 431 #: addons/gravityforms/init.php:9 62431 #: addons/gravityforms/init.php:972 432 432 msgid "Subscription Created" 433 433 msgstr "" 434 434 435 #: addons/gravityforms/init.php:13 59435 #: addons/gravityforms/init.php:1372 436 436 #: addons/woocommerce/init.php:143 437 437 #: templates/form-woocommerce.php:65 … … 1664 1664 1665 1665 #: simple-payment-plugin.php:395 1666 #: simple-payment-plugin.php:396 1666 1667 msgid "Transaction Details" 1667 1668 msgstr "" … … 1699 1700 msgstr "" 1700 1701 1701 #: simple-payment-plugin.php:125 21702 #: simple-payment-plugin.php:1251 1702 1703 msgid "Couldn't update transaction: %s" 1703 1704 msgstr "" -
simple-payment/trunk/readme.txt
r2895596 r3021631 4 4 Tags: credit card, simple payment, donation, membership, checkout, payment request, payment gateway, sales, woocommerce, store, ecommerce, e-commerce, commerce, gutenberg, elementor, cardcom, icount, icredit, payme, isracard, paypal 5 5 Requires at least: 4.6 6 Tested up to: 6. 2.07 Stable tag: 2.3. 26 Tested up to: 6.4 7 Stable tag: 2.3.3 8 8 Requires PHP: 5.4 9 9 License: GPLv2 or later -
simple-payment/trunk/simple-payment-plugin.php
r2895596 r3021631 4 4 * Plugin URI: https://simple-payment.yalla-ya.com 5 5 * Description: Simple Payment enables integration with multiple payment gateways, and customize multiple payment forms. 6 * Version: 2.3. 26 * Version: 2.3.3 7 7 * Author: Ido Kobelkowsky / yalla ya! 8 8 * Author URI: https://github.com/idokd … … 392 392 add_action( "load-$hook", [$this, 'transactions'] ); 393 393 394 $hook = add_submenu_page( null,395 __( 'Transaction Details', 'simple-payment'),396 null,394 $hook = add_submenu_page( 'simple-payments', 395 __( 'Transaction Details', 'simple-payment' ), 396 __ ('Transaction Details', 'simple-payment' ), 397 397 'manage_options', 398 398 'simple-payments-details', 399 [ $this, 'render_transaction_log']399 [ $this, 'render_transaction_log' ] 400 400 ); 401 401 add_action( "load-$hook", [$this, 'info'] ); … … 855 855 if ( isset( $_REQUEST[ 'payment_id' ] ) && $_REQUEST[ 'payment_id' ] ) $params = array_merge( $this->fetch( $_REQUEST[ 'payment_id' ] ), $_REQUEST ); 856 856 else $params = $_REQUEST; 857 print $url;858 857 $this->post_process( $params, $engine ); 859 858 do_action( 'sp_payment_success', $params ); -
simple-payment/trunk/vendor/yalla-ya/simple-payment/Engines/PayMe.php
r2881379 r3021631 132 132 $json = [ 133 133 'seller_payme_id' => $this->password, 134 'sale_price' => str_replace('.', '', $params['amount']),134 'sale_price' => intval( $params[ 'amount' ] * 100 ), 135 135 'currency' => $currency, 136 'product_name' => $params[ 'product'],136 'product_name' => $params[ 'product' ], 137 137 'installments' => 1, // 103 {min}{max} 138 138 'sale_callback_url' => $this->url(SimplePayment::OPERATION_STATUS, $params), 139 139 'sale_return_url' => $this->url(SimplePayment::OPERATION_SUCCESS, $params), 140 'capture_buyer' => 1,141 140 'language' => $language 142 141 ]; … … 149 148 150 149 $json['sale_send_notification'] = $this->param('notify') ? 1 : 0; 151 if (isset($params[SimplePayment::METHOD]) && $params[SimplePayment::METHOD]) $json['sale_payment_method'] = $params[SimplePayment::METHOD]; 150 $method = isset( $params[ SimplePayment::METHOD ] ) ? $params[ SimplePayment::METHOD ] : 'credit-card'; 151 if ( $method ) { 152 $json[ 'sale_payment_method' ] = $method; 153 } 154 155 switch( $method ) { 156 case 'credit-card': 157 $json[ 'capture_buyer' ] = 1; 158 $operation = 'capture-sale'; 159 break; 160 default: 161 $operation = 'generate-sale'; 162 } 152 163 153 164 // market_fee , capture_buyer 154 165 // for tokenization: buyer_key 155 166 156 $status = $this->post($this->api[ 'capture-sale'], json_encode($json), [ 'Content-Type: application/json' ], false);167 $status = $this->post($this->api[ $operation ], json_encode($json), [ 'Content-Type: application/json' ], false); 157 168 $status = json_decode($status, true); 158 169 $status['url'] = $status['sale_url']; -
simple-payment/trunk/vendor/yalla-ya/simple-payment/Engines/PayPal.php
r2730843 r3021631 29 29 public $context; 30 30 public $clientId; 31 32 public static $domains = [ 33 'paypal.com', 34 'www.paypal.com' 35 ]; 31 36 32 37 public function __construct($params = null, $handler = null, $sandbox = true) { … … 63 68 64 69 public function process($params) { 65 if ($this->context) { 66 header("Location: ".$params['url']); 67 return(true); 70 if ( $this->context ) { 71 return( $params[ 'url' ] ); 68 72 } 69 $post = $params[ 'post'];73 $post = $params[ 'post' ]; 70 74 // Process the transaction, for example 71 75 // - Call payment gateway API … … 91 95 if ($this->context) { 92 96 $payer = new Payer(); 93 $payer->setPaymentMethod("paypal"); // $this->param('paypal_method') 94 $item = new Item(); 95 $item->setName($concept)->setCurrency($currency)->setQuantity(1)->setPrice($amount); 97 $payer->setPaymentMethod( 'paypal' ); // $this->param('paypal_method') 98 $item = ( new Item() )->setName( $concept ) 99 ->setCurrency( $currency ) 100 ->setQuantity( 1 ) 101 ->setPrice( $amount ); 96 102 $list = new ItemList(); 97 103 $list->setItems(array($item)); … … 146 152 147 153 } 148 $params[ 'post'] = $post;154 $params[ 'post' ] = $post; 149 155 150 $post[ 'url'] = $this->sandbox ? $this->api['sandbox']['post'] : $this->api['post'];156 $post[ 'url' ] = $this->sandbox ? $this->api['sandbox']['post'] : $this->api['post']; 151 157 $this->save([ 152 158 'transaction_id' => $this->transaction, … … 154 160 'status' => null, 155 161 'description' => 'Express Checkout', 156 'request' => json_encode( $post),162 'request' => json_encode( $params ), 157 163 'response' => null 158 164 ]); 159 return( $params);165 return( $params ); 160 166 } 161 167 -
simple-payment/trunk/vendor/yalla-ya/simple-payment/Engines/iCount.php
r2881379 r3021631 227 227 $post['cc_validity'] = $params[ SimplePayment::CARD_EXPIRY_YEAR ] . '-' . $params[ SimplePayment::CARD_EXPIRY_MONTH ]; 228 228 $post['cc_holder_name'] = $params[SimplePayment::CARD_OWNER]; 229 if ( isset($params[SimplePayment::CARD_OWNER_ID])) $post['cc_holder_id'] = $params[SimplePayment::CARD_OWNER_ID];229 if ( isset( $params[ SimplePayment::CARD_OWNER_ID ] ) ) $post[ 'cc_holder_id' ] = $params[ SimplePayment::CARD_OWNER_ID ]; 230 230 } 231 231 } else {
Note: See TracChangeset
for help on using the changeset viewer.