Giter Club home page Giter Club logo

plugin-woocommerce's Introduction

WooCommerce plugin for Paylike CircleCI

This plugin is not developed or maintained by Paylike but kindly made available by a user.

Released under the GPL V3 license: https://opensource.org/licenses/GPL-3.0

Supported WooCommerce versions

Last succesfull test

The plugin has been tested with most versions of WooCommerce at every iteration. We recommend using the latest version of WooCommerce, but if that is not possible for some reason, test the plugin with your WooCommerce version and it would probably function properly.

Installation

Once you have installed WooCommerce on your Wordpress setup, follow these simple steps:

  1. Signup at paylike.io (it’s free)
  2. Create a live account
  3. Create an app key for your WooCommerce website
  4. Upload the plugin files to the /wp-content/plugins/woocommerce-gateway-paylike directory, or install the plugin through the WordPress plugins screen directly.
  5. Activate the plugin through the 'Plugins' screen in WordPress.
  6. Insert the app key and your public key in the Checkout settings for the Paylike payment plugin

Updating settings

Under the WooCommerce Paylike settings, you can:

  • Update the payment method text in the payment gateways list
  • Update the payment method description in the payment gateways list
  • Update the title that shows up in the payment popup
  • Add test/live keys
  • Set payment mode (test/live)
  • Change the capture type (Instant/Manual by changing the order status)

How to

  1. Capture
  • In Instant mode, the orders are captured automatically
  • In delayed mode you can capture an order by moving the order to the completed status.
  1. Refund
  • To refund an order you can use the refund action in woocommerce, type the amount and use the refund via paylike button.
  1. Void
  • To void an order you can use the refund action in woocommerce, type the amount and use the refund via paylike button. You can only do this if the order is not captured, if you have captured already use the refund.

Updating the receipt payment template

For the payment page in the "Redirect to payment page after order created" Checkout mode, you can overwrite the template by creating a file in your theme under paylike/receipt.php. Make sure to include an element with the id of paylike-payment-button so that the user is able to make the payment.

Advanced

Due to the floating point precision issue with some numbers, it is recommended to have the bcmath extension installed.

Filters

Change card icons

woocommerce_paylike_card_icon

function your_prefix_change_visa( $url, $type ) {
	if ( $type == 'visa' ) {
		return 'https://your-url.com/path-to-new-visa-logo.png';
	}

	return $url;
}

add_filter( 'woocommerce_paylike_card_icon', 'your_prefix_change_visa', 10, 2 );

Change account keys based on currency

paylike_secret_key

function paylike_secret_key( $secret_key ) {

    $settings = WOOMULTI_CURRENCY_F_Data::get_ins();
    $current_currency = $settings->get_current_currency();

    if($current_currency == 'USD'){
        return $secret_key;
    }

    switch ($current_currency){
        case 'RON':
            $secret_key = 'ron-secret-key';
    }

    return $secret_key;
}
add_filter( 'paylike_secret_key', 'paylike_secret_key' );

function paylike_public_key( $public_key ) {

    $settings = WOOMULTI_CURRENCY_F_Data::get_ins();
    $current_currency = $settings->get_current_currency();

    if($current_currency == 'USD'){
        return $public_key;
    }

    switch ($current_currency){
        case 'RON':
            $public_key = 'ron-public-key';
    }

    return $public_key;
}
add_filter( 'paylike_public_key', 'paylike_public_key' );

Third Party Compatibilities

plugin-woocommerce's People

Contributors

cristiancalara avatar ionutcalara avatar jespernissen avatar larsbothomsen avatar nagygabor avatar passatgt avatar tjconcept avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plugin-woocommerce's Issues

Paylike error

Dear Paylike!
There is a problem that when you come to the checkout page, you can select the credit card payment option, then clicking the send order button will not bring up the payment panel, or even navigate to a page not found, and I don't know what it is ...?! I attach the picture that is instead of the payment window, everything has been fine so far, so I don't even know what the problem is ...?
Although the card details would be entered, but it doesn't come in, it comes in instead, this is the no results page ...?
Thanks! Have a nice day!

Suggestion - Generic way to send payments to different accounts based on the currency

I'm the author of the Aelia Currency Switcher and I was asked by a common customer if it would be possible to adapt the example from your documentation to work with our solution. Based on my understanding, it should be simple enough.

The code can be adapted to work with the Aelia Currency Switcher as follows:

Paylike - Change account keys based on the active currency

/**
 * Sets the private key depending on the active currency set by the Aelia Currency Switcher.
 *
 * @param string $default_secret_key
 * @return string
 */
add_filter('paylike_secret_key', function($default_secret_key) {
	$secret_keys = [
		'RON' => 'ron-secret-key',
		'EUR' => 'eur-secret-key',
		'GBP' => 'gbp-secret-key',
	];

	// Fetch the active  using the WooCommerce core function get_woocommerce_currency().
	// When the Aelia Currency Switcher is active, this will return the active currency 
	// automatically. When it's disabled, or absent, it will return the shop's base currency. 
	// No need to check for the presence of classes, functions, or call them directly.
	//
	// After that, return the secret key matching the active currency. If absent, return the 
	// default secret key
	return $secret_keys[get_woocommerce_currency()] ?? $default_secret_key;
});

/**
 * Sets the public key depending on the active currency set by the Aelia Currency Switcher.
 *
 * @param string $default_public_key
 * @return string
 */
add_filter('paylike_public_key', function($default_public_key) {
	$public_keys = [
		'RON' => 'ron-public-key',
		'EUR' => 'eur-public-key',
		'GBP' => 'gbp-public-key',
	];

	// Fetch the active  using the WooCommerce core function get_woocommerce_currency().
	// When the Aelia Currency Switcher is active, this will return the active currency 
	// automatically. When it's disabled, or absent, it will return the shop's base currency. 
	// No need to check for the presence of classes, functions, or call them directly.
	//
	// After that, return the public key matching the active currency. If absent, return the 
	// default public key
	return $public_keys[get_woocommerce_currency()] ?? $default_public_key;
});

This might also work with other multi-currency plugins, as long as they return the active currency when one calls get_woocommerce_currency(). I thought it would be a good idea to let you know, as that will increase cross-compatibility between plugins. 🙂

Woo Subscriptions/Memberships recurring payments failing

Dear Support/Dev Team,

our client has a WordPress/WooCommerce based e-commerce site with Paylike payments set up using WooCommerce Memberships and Subscriptions plugins. Our client would like to use recurring payments in order to sell monthly paid membership services.

The memberships' initial payments and any other normal products payments are successful, but when a recurring payment is started we get the following error message in the order notes:

Paylike Transaction Failed (Neither Transaction ID nor Card ID was found)

I have checked the available docs and descriptions about the recurring payments at Paylike, haven't found any leads regarding this error message.

Is it possible due the used Paylike account does not have privileges to start recurring payments?
If you need more information about the shop or the hosting, please let me know.

error in the deducted order amounts

Our webshop had issues with 2 transactions. Even though the total order amounts were 35,8 and 37,8 paylike deducted 34,8 from the customer's credit card.

3DS verification problem

Hi,

After many failed payments since 1st January 2021, I tested the Paylike 3DS verification and found a huge bug.

The Paylike iframe window's height is set to 32em, and because of that the submit button can't be clicked (or even viewed). Also the scrolling is disabled in the iframe.

paylike-hiba

I just used the following CSS code to solve the problem, but I think there should be an official update with this bug fixed.

div.paylike.overlay.tds:not(.full-screen) div.payment form div.tds-iframe iframe {
height: 45em !important;
}

We are developing a webshop (WordPress, Woocommerce) and we have added an add-on to the WooCommerce Paylike Gateway plugin to get the ’EUR’ payments in a separate “pocket”.

We are developing a webshop (WordPress, Woocommerce) and we have added an add-on to the WooCommerce Paylike Gateway plugin to get the ’EUR’ payments in a separate “pocket”.

There is an EUR capture error that we cannot resolve from our site. Here's how I summed it up:

There is a capture function between woo and paylike. This will automatically validate the payment in the pockets if the order is in complete status. In the case of USD payment, this process is going well, because the shop is also USD based and it is the paylike’s basic feature.

In the case of EUR payments, this process only happens if the admin manually complete the transaction within the paylike interface, so the payment goes into the pocket. Only the complete status set in woo does not validate automatically the transaction in the paylike pocket.

We think maybe there is some settings for this, as the plugin can't handle different currencies by default, we developed this feature for it.

There should be no problem with an API key.

Error after API keys set

Hi,
I get an error message, when try to set the API keys:

"The live private key doesn't seem to be valid
Error: Network issues ! Check your connection and try again.
null"

Checked several times, the keys are correct, copy-pasted from the admin dashboard.

What can be the problem?

Problems with isklad.eu integration

We are trying to integrate our woocomerce shop with isklad.eu system.
isklad.eu provides a plugin which acts like a back-api to the shop.
During the process of integration (which failed) I stopped on the paylike plugin error, which is weird as I don't see what do these plugins have in common.

I am willing to hop on a call, to provide further info and assistance.

olivovanie.sk [Fri Mar 18 12:32:16.444321 2022] [php7:error] PHP Fatal error:  
Uncaught Error: Class 'Paylike\\Paylike' not found in web/wp-content/plugins/payment-gateway-via-paylike-for-woocommerce/woocommerce-gateway-paylike.php:159
Stack trace:
#0 web/wp-content/plugins/payment-gateway-via-paylike-for-woocommerce/woocommerce-gateway-paylike.php(203): WC_Paylike->set_secret_key('a9ada013-dc81-4...')
#1 web/wp-content/plugins/payment-gateway-via-paylike-for-woocommerce/woocommerce-gateway-paylike.php(132): WC_Paylike->get_secret_key()
#2 web/wp-includes/class-wp-hook.php(303): WC_Paylike->init('')
#3 web/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
#4 web/wp-includes/plugin.php(470): WP_Hook->do_acti in web/wp-content/plugins/payment-gateway-via-paylike-for-woocommerce/woocommerce-gateway-paylike.php on line 159, referer https://www.isklad.eu

Error message woocommerce.

Hi!
I get this error message when I switch an order from processed to completed in woocommerce:
The request is not valid! Check if there is any validation bellow this message and adjust if possible, if not, and the problem persists, contact the developer.
Validation:
amount:Can capture at most HUF 0
![hibaüzenet](https://user-images.githubu
hibaüzenet
sercontent.com/83224212/116086770-730ad500-a6a0-11eb-8eef-1a9a9d6aa89c.PNG)

some translations missing

Hi,

2 strings are missing from woocommerce text domain, should move to woocommerce-gateway-paylike text domain

settings-paylike.php

  • line 106: __( 'Accepted Cards', 'woocommerce' )
  • line 110: __( 'Select the card types to accept.', 'woocommerce' ),

should add woocommerce-gateway-paylike text domain to
settings-paylike.php
__( 'Instant' )
__( 'Delayed' )

thanks,
Gabor

Feature request: optional debug logs

Hi there,
would be great if writing debug logs could be optional in the future. Maybe just a simple checkbox input in the payment gateway options.
I'm using the WP debug logs to monitor php errors and Paylike writes transaction information in them which I do not need to know about.
Kind regards
Jan

paylike translate problem

this sentence is in english instead of hungarian language on my website but the paylike plugin is translated to hunarian language so it could be in hungarian not in english. Can you help me please what do I have to do? How can I attache picture to this message?
Untitled-2

how to implement redirect after payment

Just a basic question about the SDK:
Can you help me with the js code to add a redirect url?
for example, when the customer finishes their payment in the popup window then he will be redirected to www.google.com
How to implement it with modifying the js code? :)

Orders not created

Dear Paylike,

I have a Woocommerce web shop, where your payment gateway is one of the payment options.
Recently, I had 2 transactions:
604bc70dbcae7d1b8e38d255
604e2520bcae7d1b8e38da78
Where the order details were not forwarded back to the shop, so the warehouse workers couldn't see the order.
With the second customer, this is actually a repeating issue (order not created)
She comes back with an order every month, and the order is never created when she pays with Paylike.

Thanks,
Tamás

Checkout problem

Dear Paylike!

I'm having a problem because the Paylike payment option on my website disappears from Checkout for some reason. I made a video of exactly what was going on. When the page is loaded, the Credit Card payment option appears dimmed, then disappears when it is fully loaded. The same is true with other templates.

https://drive.google.com/file/d/15k4BRUzUn9NXgRDINnXcO3GIzcOfKVKA/view?usp=sharing

Can you help me with what I set up wrong?

Best regards,
Viktor Banka

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.