Coder Social home page Coder Social logo

woocommerce-2checkout-api's Introduction

Integrate WooCommerce with 2Checkout Payment API (Supports PayPal Direct)


2Checkout Payment API Setup

WooCommerce Settings

  1. Copy the 'twocheckout' folder to your WordPress plugins directory under '/wp-content/plugins'.
  2. In your WordPress admin, navigate to Plugins and install the 2Checkout Payment Gateway plugin.
  3. Navigate to your WooCommerce settings page, click on Payment Gateways and click the Twocheckout link.
  4. Check to enable.
  5. Enter the payment title and descriptino.
  6. Enter your Seller ID (2Checkout Account Number).
  7. Enter your 2Checkout API publishable key.
  8. Enter your 2Checkout API private key.
  9. Click 'Save Changes'.

2Checkout PayPal Direct Setup

WooCommerce Settings

  1. Copy the 'twocheckoutpp' folder to your WordPress plugins directory under '/wp-content/plugins'.
  2. In your WordPress admin, navigate to Plugins and install the 2Checkout PayPal Direct Gateway plugin.
  3. Navigate to your WooCommerce settings page, click on Payment Gateways and click the Twocheckoutpp link.
  4. Check to enable.
  5. Enter the payment title and description.
  6. Enter your Seller ID (2Checkout Account Number).
  7. Enter your Secret Word (Must be the same value entered on your 2Checkout Site Management page.)
  8. Click Save Changes.
  9. Save your changes.

2Checkout Settings

  1. Sign in to your 2Checkout account.
  2. Click the Account tab and Site Management subcategory.
  3. Under Direct Return select Header Redirect or Given links back to my website.
  4. Enter your Secret Word.(Must be the same value entered in your WooCommerce admin.)
  5. Click Save Changes.

Please feel free to contact 2Checkout directly with any integration questions.

woocommerce-2checkout-api's People

Contributors

balusio avatar craigchristenson avatar dennisalund avatar jmcconnell91 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

woocommerce-2checkout-api's Issues

Secret word

First of all - thank you for creating this plugin.

I am checking it out on a woocommerce site.

On the woocommerce-settings for this: there is no field named "secret word". Wondering where one should enter the secret word from the 2CO.

Also, settings has "public" and "private" keys - looked all over the 2CO tabs. No where such words could be found. Am I missing anything?

Thank you for your time on this.

How can we add translation templates for wordpress

How can we add wordpress translation templates for this module to users later comes can contribute translation with their language and use it?
For now I found myself changing the php files for translations of words need to be shown in my language in screen. I would like to help with building of pot file to everybody use from, and contribute my language translation. However for now I am not a php developer and do not know how to prepare such pot templates, and best practices, but I can study the necessary bits.

Undefined property: WC_Gateway_Twocheckout::$debug

Hi Craig,

I have 3 instances of the following error in admin area and one on the payment section of the front end:

WC_Gateway_Twocheckout::$debug in /home/mysite/beta2/wp-content/plugins/twocheckout/wc-twocheckout.php on line 47

Notice: Undefined property: WC_Gateway_Twocheckout::$debug in /home/mysite/beta2/wp-content/plugins/twocheckout/wc-twocheckout.php on line 47

Notice: Undefined property: WC_Gateway_Twocheckout::$debug in /home/mysite/beta2/wp-content/plugins/twocheckout/wc-twocheckout.php on line 47

Using this with WC 2.3.8 and WP 4.2.1. Have disabled all other plugins except WC and yours but no change. Any ideas on how to fix?

Thanks for any help.

Credit Card Fields

Hello Mr. Craig,

Excuse me, can you please update the plugin and add that the number field is strict to numbers only and maybe certain amount or digits ?

Plus, if it is possible to let us know how to customize it using CSS so it looks like stripe ?

Thanks a lot for this awesome plugin

Javascript Error in 2co.js

Hello,
I'm having an issue with this plugin. I've installed version 0.0.2 and it's not revealing credit card fields and paypal is not being accepted as payment option. With the old version (0.0.1), the credit card fields are displayed by default but when a user selects paypal as an option and clicks "Place Order," the credit card form displays this error: "Credit Card details are incorrect, please try again."
Not sure if this is related but I noticed a javascript error in 2co.js (see screenshot below).
2cojs_error
Any assistance would be appreciated.
Thank you,
Michele
[email protected]

Order completion email is not being sent to the customer

Hi @craigchristenson ,

Thanks for this wonderful plugin. However, our customers are making complaints regarding order completion emails which do not get deliver to them when they pay using 2CO.

WooCommerce is sending email just fine for our free products which do not involve this plugin. Could you please help us find the reason.

WC Version: 2.5.5
WP Version: 4.6.1

Authentication error when re-ordering STATE/PROVINCE field!

Hello dear Mr. Craig and everybody :)

Please help me fix this nightmare,, i am using checkout editor plugin and i know when using that it breaks the plugin somehow.. But i really need this checkout editor plugin.
We lost so many customers, as they want to buy but after they click place order it gives "authentication failed" error message. and stop the order process.
Of course i am sure i have out all the key right and so on, actually without the editor plugin it works okay...

I have messaged you everywhere Mr. Craig, can you please help. Please.

Thanks

how to customize the input form?

I have a problem with the year select form, the down arrow is obscuring the year date.
I how could I customize it?
Please find attached a screen shot of this issue.

Thanks advanced.
input-f1
input-f2

Fatal error: Cannot declare class Twocheckout_Charge

I'm getting following error,

Fatal error: Cannot declare class Twocheckout_Charge, because the name is already in use in /home/html/wp-content/plugins/twocheckout/Twocheckout/TwocheckoutCharge.php on line 0

Wordpress v - 4.9.8
Woocommerce v - 3.4.6

ISSUE - Double Payment

Thanks for creating this, it is much appreciated.

One problem that I have experienced is:

customer enters delivery info and credit card info
all fields on delivery info and credit card info go blank (while it is loading the authorisation)
customer enters their info again > double payment now happens

Is it possible to have a 'loading wheel' type effect happen whilst authorisation is happening to let the customer know that the process is busy.

Authorization error from time to time.

I have installed latest versions of WordPress+WooCommerce+woocommerce-2checkout-api.
My customers often have error Authorization failed, when try to pay order via 2CO API plugin. API Call Log items have "No items selected" message. This problem happening from approximately 2 times out of 3.
How can I fix this or give you more details?
er

PHP Notice: Undefined property: WC_Gateway_Twocheckout::$notify_url in /wp-content/plugins/twocheckout/wc-twocheckout.php on line 365

noticing in the error logs:
PHP Notice: Undefined property: WC_Gateway_Twocheckout::$notify_url in /wp-content/plugins/twocheckout/wc-twocheckout.php on line 365

It looks like the notify url is not implemented, and only referenced in the logging statement:
$this->log( 'Generating payment form for order ' . $order->get_order_number() . '. Notify URL: ' . $this->notify_url );

I was going to ask, when using the 2Checkout API Gateway, what is the correct setting to set in 2Checkout for Instant Notification Settings...
For example this is equivalent to the IPN notification url in paypal which would be set to eg: http://example.com/?wc-api=WC_Gateway_Paypal

In the standard paypal gateway this is implemented by:

// Handle wc-api endpoint requests. 
add_action( 'parse_request', array( $this, 'handle_api_requests' ), 0 ); 
...
public function handle_api_requests() { 
global $wp; 
if ( ! empty( $_GET['wc-api'] ) ) { 

... etc

I checked through the code and I can't see any code like this in the implementation at the moment.

woocomerce currency isssue

please I can't configure 2checkout on my website I get this error message: "2Checkout does not support your store currency." the currency off my store is Franc afrique central (CFA).... please how can i fix it

No "processing" message after customer completes checkout

Dear Craig,

We have noticed a usability issue. After a customer completes the checkout (not paypal), there is a delay before the customer gets the message that the transaction is completed. (normal because the transaction needs to be processed) During the wait for processing/approval, no message is shown. And it looks like nothing has happened.

This leads to customers refreshing the page or pressing the "place order" button again. Which sometimes leads to duplicate orders.

This can be avoided if there would be a message that tells the customers that the order is processing. (a popup message or a timer to show that it is processing). Until they get the approval message in the popup.

System information:

  • Wordpress 4.9.8
  • WooCommerce version: 3.5.3
  • PHP version: 7.1.25
  • MySql: 5.6.40-84.0-log

twocheckoutpp Issue after update woocommerce

Hi Craig,

After update woocomerce in new version 2.6.1 paypal button not working . its only shows message Thank you for your order. We are now redirecting you to PayPal to make payment. but it is not redirecting on paypal please check this issue .

                                  Thanks in Advance

Regards
Priyank

payment response error calling object process_payment

i choose a payment method with twocheckout plugin for woocommerce , the payment proccess it is ok, i can make the paymanet via sandbox with the plugin, the issue is on the return payment of the process :
after payment get placed on the twochecktout API , the page response drop this error :

Order properties should not be accessed direct

PHP Notice:  billing_first_name called<strong>incorrectly</strong>. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Form_Handler::checkout_action, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Gateway_Twocheckout->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong

also says headers already sent:

"Warning: Cannot modify header information - headers already sent"
but the payment is ok, and the order got placed, acctually even the orders mails go sent,
the main problem is on the response paymente view
thanks for the support and the help

Please remove inline styling

The plugin uses inline styling in HTML Tags and it becomes difficult to override styles using CSS. Just to override a few styles I had to override the complete plugin in WordPress which is not necessary.

I think if you just get rid of the inline styling it will help a lot.

Direct Payment EUR detected as USD

Hi! I have a multi-currency site, and when a user select eur as Payment for Direct Payment with credit card on my Website, that payment on my account, is detected as USD and I receive a USD payment.. IE.:

  • If a euro zone customer select €50 eu on my account is taked as $50 USD. Api call send EUR as currency
  • If a usd zone customer select $50 usd on my account is taked as $ 50 usd. Api call sen USD as currency

Product name issue

Hello Craig

Thanks for the API. I am not techie but got things to work except one area...the 2CO email that goes out does not register a Product Name (has number) and this is the same number appearing for Merchant Id in the email. All other fields seem to have gone over to 2CO. Not sure what is causing this.

I downloaded woocommerce and your api just 2 days back.

Any help would be greatly appreciated. tks

unautherized error

www.figureology.com this is my site . i am used woocomerce--2checkout-api . all details are given correctly. but it came "unauthorized" .whats the problem?. i have used 2checkout publisheable key and private key. used to test credit card details . please tell me solution .

cURL call failed

I am using sandbox for testing on my site http://anuvaasoft.com/shop/ while checkout after putting details credit card number as : 4000000000000002 , month : february , year : 2018 , cvv 123, i get the error as cURL call failed can you tell me why it is?

Internal Server Error

Hi,
Recently i have installed your plugin at wordpress. i have the updated version of woocommerce which is 3.3.3 and it has installed successfully. but when i go to check out page and fill in all the detail and when i try to click on pay now button then i get INTERNAL SERVER ERROR.
can you please help. I shall be thankful

There's no POT file for translations

I need to translate Checkout Labels from English to Spanish, I tried using Loco Translate WP Plugin but no template was found, I tried creating one from source files (php) but only 4 strings were found. Please add a POT template and update. Thanks!

Place order button not working

Hello
I installed the plugin like as you said and im using sandbox data when i press place order nothing happens
did any one have the same issue?

Authorization failed in Sandbox

Hi,
I'm still testing in the sandbox and I get authorisation failed with API Call Log like:

Call Timestamp API Call Attempted API Call Body Key / Token Match Response Body to Seller
2018-06-22 07:16:05 AM Authorization No Items Selected. No Authorization Failed

I did one successful sandbox test using Postman following the instructions at:
https://www.2checkout.com/documentation/sandbox/payment-api-testing
generating the key from the pastebin code and running in postman as advised.

the error could perhaps relate to:
#41 2co.js can't be loaded

Plugin installation error

Dear Craig,

I am trying to install subject plug in on woo-commerce website through installer by uploading the ZIP file which i downloaded from your website. But the following error is coming up and plug in is not installed. Please help.

Note below message

Unpacking the package…

Installing the plugin…

The package could not be installed. No valid plugins were found.

Plugin installation failed.

Authorization Failed. No Items Selected.

Hi, recently I am getting the authorization failure with "No Items Selected" error. I know this is not an issue with the cards as I have personally tried checking out with multiple valid cards. What can be the cause of that Issue? I can post screenshot from 2CO API Call log if it helps.

Thanks

"Bad request - parameter error" after adding a new currency

I use woocommerce + Pricing zones , so i show the prices in PYG currency

when i use your plugin, and the price is in PYG, on the checkout...
the 2checkout option doesn show up

so i went to the config files wc-twochekout.php . and in the array, i added the currency PYG

function is_valid_for_use() {
$supported_currencies = array(
'AFN', 'ALL', 'DZD', 'ARS', 'AUD', 'AZN', 'BSD', 'BDT', 'BBD',
'BZD', 'BMD', 'BOB', 'BWP', 'BRL', 'GBP', 'BND', 'BGN', 'CAD',
'CLP', 'CNY', 'COP', 'CRC', 'HRK', 'CZK', 'DKK', 'DOP', 'XCD',
'EGP', 'EUR', 'FJD', 'GTQ', 'HKD', 'HNL', 'HUF', 'INR', 'IDR',
'ILS', 'JMD', 'JPY', 'KZT', 'KES', 'LAK', 'MMK', 'LBP', 'LRD',
'MOP', 'MYR', 'MVR', 'MRO', 'MUR', 'MXN', 'MAD', 'NPR', 'TWD',
'NZD', 'NIO', 'NOK', 'PKR', 'PGK', 'PEN', 'PHP', 'PLN', 'QAR',
'RON', 'RUB', 'WST', 'SAR', 'SCR', 'SGF', 'SBD', 'ZAR', 'KRW',
'LKR', 'SEK', 'CHF', 'SYP', 'THB', 'TOP', 'TTD', 'TRY', 'UAH',
'AED', 'USD', 'VUV', 'VND', 'XOF', 'PYG', 'YER');

and i have no idea how to fix,

Credit Card Collection

I was asked by 2checkout to remove the functionality on my website that allows collecting credit card information directly from customers. Can someone guide me on how to solve the issue, please

Checkout’s products collect this information for you. If you collect credit card information, it may impact your PCI-DSS compliance validation requirements.

Thank you

2Checkout dashboard show "Intangible Sale No Shipping"

When someone order from my store, in 2co dashboard my order is marked as intangible, and I cant add tracking number. My product is tangible, so is important to add tracking number in my 2checkout dashboard.
WordPress version: 4.7.1
WooCommerce version: 2.6.11
Thanks.

Notify URL input?

if ( ( 'yes' == $this->debug) && ($this->notify_url) && ($this->notify_url !=='') )

as the equality test alone would error if the property is undefined..

Originally posted by @Jon007 in #32 (comment)

Where are you asking for this notify URL input? I cannot see this field in 2checkout API settings at all.

Paypal bug

The payment went through successfully, but the customers see the message:
"2Checkout Hash Mismatch… check your secret word."
instead the Thank you page.

There is a bug in plugin; not returns to Thank you page after successful payment.

I have rechecked and edit my secret word, it is absolutely fine.
Payments via credit cards work with no problem.

Please fix.

Error : 2Checkout unsupported currency

Getting this error on Woocommerce checkout settings page.

"Gateway Disabled: 2Checkout does not support your store currency"

How to convert local currency to USD and pass the converted USD value to 2CO ?
Still need to keep the local currency as display currency in webstore.

Hi craig

I 'm using 2 checkout plugin in my WordPress woocommerce site.

Default country is Pakistan. so the matter is when the country customer select this 2checkout option its work done. when outsider country selecting this option they said there is an error happen which is "Authorization fail" that's why the can't order at our site.

Can you please assist me how can i solve this.

Thanks

Zubair
3bd6e903-7c75-46c6-aad7-aff5b1db5499

Upload error

Unpacking the package…

Installing the plugin…

The package could not be installed. No valid plugins were found.

Plugin install failed.
65bcb6ff7ae64aa188462910e83678a3

Bad request - parameter error

Hello,

I have created my website in wordpress and i have integrated 2checkout payment method using these steps as mentioned in this link https://www.2checkout.com/shopping-cart/woocommerce

Download or clone the extension from Github.
Copy the ‘twocheckout’ folder to your WordPress ‘plugins’ directory under ‘/wp-content/plugins’.
In your WordPress admin, navigate to Plugins and install the 2Checkout Payment Gateway plugin.
Navigate to your WooCommerce settings page, click on Payment Gateways and click the Twocheckout link.
Check to enable.
Enter the payment title and description.
Enter your Seller ID (2Checkout Account Number).
Enter your 2Checkout API publishable key.
Enter your 2Checkout API private key.
Click Save Changes.
Important note: The API keys can be found in your 2Checkout account’s dashboard under the API tab.

2Checkout Settings:

Sign in to your 2Checkout account.
Click the Account tab and Site Management subcategory.
Under Direct Return select Header Redirect.
Enter your Secret Word (Must be the same value entered in your WooCommerce admin.)
Click Save Changes.

But I am getting this error (Bad request - parameter error).
Please help me how to fix it?

Thanks.

i tried to install, but it says no valid plugins were found

I tried to install it, but thes eis woocommerce answer:

Installing Plugin from uploaded file: woocommerce-2checkout-api-master.zip
Unpacking the package…

Installing the plugin…

The package could not be installed. No valid plugins were found.

Plugin installation failed

I need to installurgent 2checkout in two sites. What I can do?

Approved URL link?

Hi,
What link am I supposed to add to Approved URL? The link to confirmation page only? Do I need to add extra parameters to it?

Thanks,
Radu

mandatory state not available

Hi,
We are having some trouble because some country doesn't have the state option in the billing/shipping details for the checkout page. The country that are missing state are France,Netherlands, Poland and Singapore.
Some country doesn't have the mandatory state option. U.K, Roumania,Switzerland

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.