PayPal authorization feature

This commit is contained in:
Mike Jolley 2013-07-23 10:18:58 +01:00
parent f711d50b91
commit 81f188b4ca
2 changed files with 16 additions and 2 deletions

View File

@ -50,6 +50,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
$this->form_submission_method = $this->get_option( 'form_submission_method' ) == 'yes' ? true : false;
$this->page_style = $this->get_option( 'page_style' );
$this->invoice_prefix = $this->get_option( 'invoice_prefix', 'WC-' );
$this->paymentaction = $this->get_option( 'paymentaction', 'sale' );
// Logs
if ( 'yes' == $this->debug )
@ -158,6 +159,17 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
'default' => 'WC-',
'desc_tip' => true,
),
'paymentaction' => array(
'title' => __( 'Payment Action', 'woocommerce' ),
'type' => 'select',
'description' => __( 'Choose whether you wish to capture funds immediately or authorize payment only.', 'woocommerce' ),
'default' => 'sale',
'desc_tip' => true,
'options' => array(
'sale' => __( 'Capture', 'woocommerce' ),
'authorization' => __( 'Authorize', 'woocommerce' )
)
),
'form_submission_method' => array(
'title' => __( 'Submission method', 'woocommerce' ),
'type' => 'checkbox',
@ -262,6 +274,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
'return' => add_query_arg( 'utm_nooverride', '1', $this->get_return_url( $order ) ),
'cancel_return' => $order->get_cancel_order_url(),
'page_style' => $this->page_style,
'paymentaction' => $this->paymentaction,
// Order key + ID
'invoice' => $this->invoice_prefix . ltrim( $order->get_order_number(), '#' ),

View File

@ -171,8 +171,10 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Feature - Bulk edit increase / decrease variation prices by fixed or percentage values
* Feature - Admin action to link past orders of the same email address to a new user.
* Feature - Account edit page for editing profile data such as email.
* Feature - Customers panel.
* Feature - Customer list reports.
* Feature - Reports - New design, export csvs, more data.
* Feature - Ability to link past orders to a customer (before they registered).
* Feature - Authorize option for paypal standard.
* Tweak - Added filter to check the 'Create account' checkbox on checkout by default.
* Tweak - Update CPT parameters for 'product_variation' and 'shop_coupon' to be no longer public.
* Tweak - COD processing instead of on-hold.
@ -200,7 +202,6 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Refactor - Widget classes (added abstract and combined similar widgets).
* Refactor - Removed pay and thanks pages. Endpoints are used instead.
* Refactor - Removed certain my-account pages. Endpoints are used instead.
* Refactor - Reports. New design, export csvs, more data.
* Localization - Portugese locale by jpBenfica.
* Localization - Swedish translation by Björn Sennbrink.
* Localization - Japanese translation by Shohei Tanaka.