Giter VIP home page Giter VIP logo

pmpro-ccbill's Introduction

=== Paid Memberships Pro - CCBill Add On ===
Contributors: strangerstudios
Tags: paid memberships pro, payment gateway, ccbill
Requires at least: 5.5
Tested up to: 6.6
Stable tag: 0.5.1

Adds the ability to accept payments using the CCBill Payment Gateway

== Description ==

Adds CCBill as a payment gateway to your list of accepted payment gateways. CCBill makes use of an off-site payment method process. This Add On is currently in Beta. 

[Read the full documentation for the CCBill Add On](https://www.paidmembershipspro.com/add-ons/ccbill-payment-gateway/)

= Official Paid Memberships Pro Add On =

This is an official Add On for [Paid Memberships Pro](https://www.paidmembershipspro.com), the most complete member management and membership subscriptions plugin for WordPress.

== Installation ==

1. Make sure you have the Paid Memberships Pro plugin installed and activated.
1. Upload the `pmpro-ccbill` directory to the `/wp-content/plugins/` directory of your site.
1. Activate the plugin through the 'Plugins' menu in WordPress.

Navigate to Memberships > Settings > Payment Gateways & SSL and select the CCBill payment gateway. You will then need to fill out the required account credentials to connect your website to the payment gateway.

== Frequently Asked Questions ==

= I found a bug in the plugin. =

Please post it in the GitHub issue tracker here: https://github.com/strangerstudios/pmpro-ccbill/issues

= I need help installing, configuring, or customizing the plugin. =

Please visit our premium support site at http://www.paidmembershipspro.com for more documentation and our support forums.

== Changelog ==
= 0.5.1 - 2024-08-14 =
* BUG FIX: Fixed an issue where recurring orders would show an incorrect date. (Thanks @misfist)

= 0.5 - 2024-07-15 =
* ENHANCEMENT: Added improved support for renewals and renewal failures. (Thanks @misfist for your contribution)
* ENHANCEMENT: Added support for "Expired" webhook event types, when a subscription has expired. (@andrewlimaza)
* REFACTOR: Adjusted the HTML for the checkout button to support newer versions of PMPro and improved accessibility. (@kimcoleman)

= 0.4.2 - 2023-10-05 =
* BUG FIX: Fixed an issue where the initialPeriod was incorrectly set for levels with an expiration.

= 0.4.1 - 2023-08-15 =
* BUG FIX: Fixed an issue where webhook wasn't being verified correctly.

= 0.4 - 2023-07-27 =
* SECURITY: Fixed a minor issue to verify the webhook received is related to the correct CCBill account.

= 0.3 - 2023-05-05 =
* BUG FIX: Fixed issue where cancellations in PMPro were not being sent to CCBill.
* BUG FIX: Fixed issue where "failed cancellation" emails may be incorrectly sent.
* BUG FIX: Handling undefined variable in cancellation webhook code.

= 0.2 - 2023-04-09 =
* BUG FIX: Only cancel relevant URL on sub cancellation.
* BUG FIX: Fixed calculation of the initialPeriod value passed to CCBill.
* BUG FIX: Fixed errors in the webhook code.

= 0.1 - 2022-10-05 =
* Initial Release

pmpro-ccbill's People

Contributors

andrewlimaza avatar dparker1005 avatar github-actions[bot] avatar greathmaster avatar ideadude avatar jarrydlong avatar messica avatar misfist avatar therealrizeo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pmpro-ccbill's Issues

ENHANCEMENT: Clearer instructions on Payment Settings page.

CCBill's admin interface can be confusing and our integration requires a lot of different credentials to completely function correctly. We should probably provide more guidance as to how to set the plugin up in the Payment Settings page in addition to whatever plugin set up documentation we provide. This needs more discussion.

Cancelation Event Cancels Membership Instead of Subscription

Describe the bug
The cancellation event cancels the member's membership rather than just the subscription.

What should happen is that the subscription is canceled so they're no longer billed, but the membership should remain active until the next bill date.

https://github.com/strangerstudios/pmpro-ccbill/blob/dev/webhook.php#L348-L367

To Reproduce
Steps to reproduce the behavior:

Event sent to:
https://{{base_url}}/wp-admin/admin-ajax.php?action=ccbill-webhook&eventType=Cancellation&clientAccnum={{clientAccnum}}&clientSubacc={{clientSubacc}}&eventGroup={{eventGroup}}&validate=true&creationDate=2024-07-14T05:24:49.122Z

Event data sent:

subscriptionId {{subscriptionId}}
transactionId 14621b22-b4a1-4d50-80f7-a4e69eadf8a3
timestamp 2024-07-14T05:20:50.703Z
reason Invalid Input.
source FORM

Screenshots
If applicable, please attach a screenshot to make your issue clearer.

Expected behavior
A clear and concise description of what you expected to happen.

Does not work with Cancel On Next Payment Date Add On

Describe the bug
After installing and activating the Cancel on Next Payment Date Add On, cancelling in PMPro cancels the membership level immediately.

To Reproduce
Steps to reproduce the behavior:

  1. Install Cancel On Next Payment Date Add On
  2. Checkout for a recurring membership account without a membership end date.
  3. Cancel your active membership level.
  4. See that your membership level was removed immediately.

Ticket reference: #552340

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
  • This bug happens with a default WordPress theme active, or Memberlite.
  • I can reproduce this bug consistently using the steps above.

Updating Billing Details

We need to add in functionality that updates the billing details when making changes on the PMPro Billing Page

We need to take into account:

  • That they can change their billing details (possibly save the billing page and send a request to CCBill)
  • Updating credit card details which will take them to the CCBill page

Is this plugin complete yet?

Hi there,

I have read in the description that the plugin is not complete. is it still the case? i really need to integrate ccbill to my webiste.

Your help is much appreciated.

Changing Membership Level Doesn't Cancel Old Membership Level Subscription with CCBill

Describe the bug
When a user changes their membership level, it correctly changes the membership and subscription on the site, but doesn't remove the previous subscription. This would cause a member to continue being billed for the previous level.

Essentially, a new subscription is successfully created in CCBill, but the old one isn't cancelled.

It's possible that this is related to the fact cancelled subscriptions aren't being cancelled in CCBill.

To Reproduce
Steps to reproduce the behavior:

  1. Select new membership level
  2. Complete checkout

Screenshots

Membership Changed in PMP

Membership Changed in PMP

Subscription Changed in PMP

Subscription Changed in PMP

CCBill Subscription Not Cancelled

CCBill Subscription Not Cancelled

Cancelled - PMP Details for Subscription 0124232101000014802
Details for Subscription 0124232101000014627

Expected behavior
The previous subscription should be cancelled in CCBill, so that only the new subscription remains active in CCBill.

Cancellation Email

Testing:

When testing payments through ccbill everything works fine but I am receiving an email over and over again. The testing of payment works good and the user is changed to the member status they purchased.

But immediately after the test I start receiving this email over and over again:

===========
Cancellation of subscription id: ************106 may have failed. Check CCBill Admin to confirm cancellation

Anyone know why I am receiving this email even though the user hasn't cancelled?

Issues with discount codes

Needs to be tested further, but the discount code field is disabled when the plugin is active. Should check:

  • If the selected payment is gateway, adjust the checkout settings
  • If the discount code field is still hidden when actually using CCBilll

Order date incorrectly saved from timestamp

Describe the bug

Orders created from webhook action, improperly save the date from timestamp.

Timestamp Sent: "1723351963"
Database Entry: 1970-01-01 00:33:44
Order Screen: December 31, 1969 at 4:33 pm

Timestamp Sent: "2024-08-11T04:49:48.159Z"
Database Entry: 1970-01-01 00:33:44
Order Screen: December 31, 1969 at 4:33 pm

Timestamp Sent: "2024-08-11"
Database Entry: 1970-01-01 00:33:44
Order Screen: December 31, 1969 at 4:33 pm

This seems to be caused by formatting the date

$response[ $key ] = date( 'Y-m-d H:i:s', strtotime( sanitize_text_field( $value ) ) );

Once that line is removed, the date saves properly if it's sent as a UNIX timestamp.

Incoming Timestamp: "1723351963"
Database Entry: 2024-08-11 04:52:43
Database Entry: August 10, 2024 at 9:52 pm

To Reproduce
Steps to reproduce the behavior:

  1. Send a webhook action with any format for timestamp
  2. Order screen shows December 31, 1969 at 4:33 pm

Screenshots
[If applicable, please attach a screenshot to make your issue clearer.](Firefox_Screenshot_2024-08-11T05-00-09 458Z)

Expected behavior
Orders created through webhook should display correct date.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
  • This bug happens with a default WordPress theme active, or Memberlite.
  • I can reproduce this bug consistently using the steps above.

PMPRO_CCBILL_DEBUG not working

Describe the bug
Debug flag isn't working.

As instructed on line 4, use true instead of 'log' to indicate events should be logged.

Instructions state:

//set this in your wp-config.php for debugging
//define( 'PMPRO_CCBILL_DEBUG', true );

Code was looking for:
PMPRO_CCBILL_DEBUG === "log"

To Reproduce
Steps to reproduce the behavior:

  1. Add define( 'PMPRO_CCBILL_DEBUG', true ); to ./wp-config.php
  2. Check for ./wp-content/plugins/pmpro-ccbill/logs/ccbill_webhook.txt
  3. File not present

Expected behavior
When define( 'PMPRO_CCBILL_DEBUG', true ); is set in ./wp-config.php, log file should be present and logging incoming webhook event data.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
  • This bug happens with a default WordPress theme active, or Memberlite.
  • I can reproduce this bug consistently using the steps above.

BUG: Billing Page only shows an “Update” button.

Currently there is no functionality to update a user's billing information from the Billing page, even though clicking the "Update Billing" button appears to be working correctly.

We should link to CCBill from the Billing page like we do with PayPal Express, so it's not misleading at least.

Maybe later we can actually update the billing info using their DataLink API.

BUG: Incorrectly sending subscription cancellation error email.

An email notifying the admin that cancelling the recurring subscription may have failed is being sent incorrectly. It seems to be occurring from both failed cancellations from the Cancel page and successful cancellations via webhook. There may be other cases where it's being sent incorrectly as well.

Cancellations don't reflect in CCBill

Cancelling a membership from the account page results in a success message of 'membership has been cancelled' however it does not take effect in CCBill itself.

This issue originates from ticket #491690 (mods only)

Successful renewals webhook events are not processed

Describe the bug
Successful renewals webhook events are not saved as a member order.

To Reproduce
Steps to reproduce the behavior:

  1. Webhook is received for RenewalSuccess event
Subscription ID: 0220000000000000002
Event: RenewalSuccess
Response Code: 200
URL: https://example.com/wp-admin/admin-ajax.php?action=ccbill-webhook
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ENSEventMessage 
   clientAccnum="940000" 
   clientSubacc="01" 
   eventType="RenewalSuccess" 
   eventGroup="Subscription" 
   creationDate="20240517201114" 
   validate="true">
    <subscriptionId>0224108301000365797</subscriptionId>
    <transactionId>0124138501000194835</transactionId>
    <timestamp>2024-05-17 20:11:14</timestamp>
    <accountingAmount>3.00</accountingAmount>
    <accountingCurrency>USD</accountingCurrency>
    <accountingCurrencyCode>840</accountingCurrencyCode>
    <billedAmount>3.00</billedAmount>
    <billedCurrency>USD</billedCurrency>
    <billedCurrencyCode>840</billedCurrencyCode>
    <cardType>VISA</cardType>
    <clientAccnum>942299</clientAccnum>
    <clientSubacc>0010</clientSubacc>
    <expDate>1024</expDate>
    <last4>3992</last4>
    <nextRenewalDate>2024-06-16</nextRenewalDate>
    <paymentAccount>720b797f2ee582eb1000000319514b5</paymentAccount>
    <paymentType>CREDIT</paymentType>
    <renewalDate>2024-05-17</renewalDate>
</ENSEventMessage>
  1. In ./pmpro-ccbill/webhook.php, RenewalSuccess event case is run

  2. Code looks for X-pmpro_orderid in response, which doesn't exist

  3. new MemberOrder( $order_id ) fails because $order_id is undefined

Expected behavior
RenewalSuccess event should create a new order for the user's membership.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
  • This bug happens with a default WordPress theme active, or Memberlite.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

``` ### wp-core ###

version: 6.5.3
site_language: en_US
user_language: en_US
timezone: America/Los_Angeles
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: undefined
environment_type: production
user_count: 14
dotorg_communication: true

wp-server

server_architecture: Linux 5.15.0-97-generic x86_64
httpd_software: Apache
php_version: 8.1.27 64bit
php_sapi: cgi-fcgi
max_input_variables: 1000
time_limit: 120
memory_limit: 256M
max_input_time: -1
upload_max_filesize: 512M
php_post_max_size: 512M
curl_version: 7.68.0 OpenSSL/1.1.1f
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: true
current: 2024-05-18T03:44:13+00:00
utc-time: Saturday, 18-May-24 03:44:13 UTC
server-time: 2024-05-17T20:44:11-07:00

wp-database

extension: mysqli
server_version: 8.0.34-0ubuntu0.22.04.1
client_version: mysqlnd 8.1.27
max_allowed_packet: 33554432
max_connections: 200

</details>

JavaScript Error

I am getting this issue when trying to test this.

"There are JavaScript errors on the page. Please contact the webmaster."

Show IP Address in settings page

Website IP Address is required when setting up a Datalink user. Showing this IP address on the settings page will be make it easier to get setup

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.