In DAP 4.7, we have added a user-facing ‘subscription cancellation’ feature for transactions processed by Stripe. You can configure the following shortcode to allow your users to ‘Cancel their Subscription‘. Please NOTE: You can also use this shortcode to allow your members to see a list of their latest payment transactions (the latest transaction per product). [DAPUserSubscriptions showalltransactions=”Y” showcancel=”Y” cancelimage=”http://YOURSITE.com/wp-content/plugins/DAP-WP-LiveLinks/includes/images/CancelButtonUp.gif” template=”template1″ productId=”ALL”][/DAPUserSubscriptions] If the user clicks on ‘Cancel‘ Link/Image, DAP will automatically cancel their current subscription with Paypal Standard or Authorize.net. The ‘Cancel’ feature will ONLY work with : 1) dap-generated-button-for-paypal-standard AND 2) dap-shopping-cart that integrates with Authorize.net or Paypal Payments PRO or Stripe.com. It will not work with any other payment processors or shopping carts. Attributes: a) showalltransactions=”N” If set to “Y”, the DAPUserSubscriptions shortcode will show the latest transactions (one transaction per product) and not just the Paypal / Authnet / Stripe ones. If set to “N”, the DAPUserSubscriptions shortcode will show the latest ‘Paypal / Authnet / Stripe subscription’ transactions only. b) showcancel=”Y” If set to “Y”, a user-facing-cancel link will show up next to cancel-able transactions (authnet / paypal / stripe subscription). This will allow users to cancel their own subscription. Only authnet / paypal / stripe transactions can be cancelled by users using this feature. The cancel link/button will ONLY show up for Paypal / Authnet “Subscription/Recurring” transactions. c) template=”template1″ OR template=”template2″ You can use template1 or template2 depending on your preferred display style. The template1 uses a horizontal layout. The template2 uses vertical layout. Template1 layout: Template2 layout: d) bgcolor=”#f9f9f9″ (Only applicable to template 2)
e) productId=”ALL” If you want to display all the latest transactions of all the products the logged-in user has, then user ALL. Otherwise, it can be the actual product Id of the product (for ex – productId=1) or a comma separated list of product Ids (for ex – productId=1,3 ) f) cancelimage=“http://yoursite.com/wp-content/plugins/DAP-WP-LiveLinks/includes/images/CancelButtonUp.gif” If you want to use an image for cancel button instead of cancel link, then cancelimage attribute to point to the url of the cancel button image. Please note: replace yoursite.com in the cancelimage url with the name of your site. USECASES 1) Show All latest transactions on file to the logged-in user along with cancel link for cancel-able subscriptions.
[DAPUserSubscriptions showalltransactions=”Y” showcancel=”Y” template=”template1″ productId=”ALL” ][/DAPUserSubscriptions] If you use the above shortcode in a WP page, it will show all active transactions and if it’s a paypal or authnet or stripe subscription, it will show cancel button. Your customers can cancel their authnet / paypal / stripe processed active subscriptions by clicking on the cancel button.
Cancel button will only show for : – Transactions that are cancellation eligble (for ex – it will show for active subscriptions but not for one-time-purchases) – And only if the cancel-eligible transactions are from Paypal or Authnet or Stripe. It will NOT show for other payment processors like Clickbank, Infusionsoft etc. You can customize the table header names and the cancel button image. The template1 files are under /wp-content/plugins/DAP-WP-LiveLinks/includes/cancel/template1 folder.
The template2 files are under /wp-content/plugins/DAP-WP-LiveLinks/includes/cancel/template2 folder.
If you want to customize the table layout, copy autocanceltemplate.html to customautocanceltemplate.html and make the updates to customautocanceltemplate.html. If you want to customize the template1 css, copy /wp-content/plugins/DAP-WP-LiveLinks/includes/cancel/template1/css/autocanceltemplate.css to /wp-content/plugins/DAP-WP-LiveLinks/includes/cancel/template1/css/customautocanceltemplate.css and make updates to customautocanceltemplate.css. If you want to customize the template2 css, copy /wp-content/plugins/DAP-WP-LiveLinks/includes/cancel/template2/css/autocanceltemplate.css to /wp-content/plugins/DAP-WP-LiveLinks/includes/cancel/template2/css/customautocanceltemplate.css and make updates to customautocanceltemplate.css. Here’s how it works: DAP picks up all the active products the user has. For each active product, it checks if there is a purchase transaction (transaction Id > 0) associated with that user->product row in Manage Users page. – if yes, the row is displayed with a cancel option. – if no, the script will move on to the next product 2) Show just cancel-able transactions on file to the logged-in user along with cancel link for cancel-able subscriptions [DAPUserSubscriptions showalltransactions=”N” showcancel=”Y” template=”template1″ bgcolor=”#f9f9f9″ productId=”ALL” ][/DAPUserSubscriptions]
If you use the above shortcode in a WP page, it will show only cancel eligible transactions (paypal / authnet / stripe subscriptions). Your customers can cancel their authnet / paypal / stripe active subscriptions by clicking on the cancel button/link.
Here’s how it works:
Pick all the active products the user has. For each active product, check if there is a purchase transaction (transaction Id > 0) associated with that user->product row in Manage Users page. – if yes, check if it’s a subscription purchase (IPN received by dap from the payment processor contains recurring_payment_id, or sub_id or subscr_id) and if yes, show it with a cancel button. Note: – The cancel button will only show for authnet / paypal /stripe subscription purchases. Auto-cancel not supported for other payment processors like Clickbank or Infusionsoft.
– Only cancel eligible (or already cancelled) transactions will show (i.e. one-time purchases will not show)
You can customize the ‘cancel success msg’, ‘cancel failure message’ and the ‘cancel image’ as shown below:
[DAPUserSubscriptions showalltransactions=”Y” showcancel=”Y” cancelsuccess=”Subscription Cancellation Completed Successfully!” cancelfailed=”Sorry, could not cancel the subscription!” cancelimage=”http://yoursite.com/wp-content/plugins/DAP-WP-LiveLinks/includes/images/CancelButtonUp.gif” template=”template1″][/DAPUserSubscriptions]
If showalltransactions=”Y”, then DapUserSubscriptions shortcode will show list of all products the users has from dap->manage users page.
If a product does not show up even though the user has access, it could be because:
– No transactionId ( number > 0) exists in dap users manage for this user->product (check Trans Id) field. Only paid products end up on this page where you have the shortcode.
– If the trans Id field says ‘FREE’ or ‘PAID’ (admin added), then these products will not be displayed in the DAPUSersSubscritpions page. This page will only show products that have a transaction associated with it (paid purchase).
– The product status is inactive.
– Manually added transaction