Code Monkey home page Code Monkey logo

cakephp-stripecomponent-plugin's People

Contributors

abbasali avatar chronon avatar phantomwatson 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cakephp-stripecomponent-plugin's Issues

Loading the Component on the Fly

I'm trying to load the Component on the fly but it is requesting that the controller be passed in startup(). Why? It isn't being used anywhere.

Issue in the Vendor files "instanceUrl()"

error

Hello,

I am facing an issue with the plugin, when I update the subscription for an existing customer it is not getting succeeded, please find the attachment it is giving the error as undefined method instanceUrl() in the Customer.php file (Vendor/Stripe/lib/Stripe/Customer.php),which extends to the ApiResource.php, I have downloaded this entire plugin 4months back, now I am not finding the scripts in the Vendor at all.

Here is the code for the update process:
public function updateSubscription($params=null)
{
$requestor = new Stripe_ApiRequestor($this->_apiKey);
$url = $this->instanceUrl() . '/subscription';
list($response, $apiKey) = $requestor->request('post', $url, $params);
$this->refreshFrom(array('subscription' => $response), $apiKey, true);
return $this->subscription;
}

Please help me to get rid of this issue.

How to make refund with api?

I just trying to do refund, find this in Stripe docs
$refund = \Stripe\Refund::create([
'charge' => 'ch_sG9ICouetJhw3NvixjWv',
'amount' => 1000,
]);
how to do it?

namespace and class problem

Hi,

I have used your component I do't know if the error is with the new library or what.

  1. I have tried number of ways to include the plugin, Every time it gives library not found, Finally when I remove namespace from Stripe.php line then it works good.

  2. When I tried to use the library finaly it gives me error that "Stripe_Charge" class not found.

Let me know if it's me or someone else is having same issue.

Regards,

Stripe API Libaray is missing or could not be loaded.

Hi,

I am getting the error:

Stripe API Libaray is missing or could not be loaded.

I have loaded the plugin in bootstrap.php and added my keys.

I have:

app/Vendor/stripe/stripe-php

app/Plugin/Stripe

However it won't load.

Thanks,

Alan.

Add support for creating a Card Token

Should be about as easy as this:

public function _create_stripe_token($card) {

  $mode = Configure::read('Stripe.mode');
  $key = Configure::read('Stripe.' . $mode . 'Secret');
  Stripe::setApiKey($key);

  $token = Stripe_Token::create(
    array(
      "card" => $card
    )
  );

  return $token->id ? $token->id : null;
}

Coupon support

I see that Stripe supports coupons. Is there a way to accept coupons using this plugin?

Refund partial payment

Hello Sir
Can you please update the component for having the refund function also. Thanks

Payment Result

I'm having difficulty catching the result of a new payment.

The documents say that a failed payment returns a string and a successful payment returns an array with a stripe_id.

So this should catch a failed payment

if(isset($result['stripe_id'])

But it evaluates as true despite a var_dump on result confirming that $result is a string.

I'm not sure why $result['stripe_id'] evaluates when it's a string and not an array. The only way I can see to catch success/failure is with is_array or is_string but I'm not comfortable using these.

Is there a better way?

Thank you.

New version

Any possibility you can update the Stripe version to a 2.x version?

paymentintent ?

Hi!! I'm trying to change the

Stripe_Charge::create($chargeData);

for

\Stripe\PaymentIntent::create($chargeData);

Without luck.. I added the PaymentIntent lib to Stripe.php:
require(dirname(FILE) . '/Stripe/PaymentIntent.php');

BUT all them time I receive this error

Error: Fatal Error (1): Class 'Stripe\ApiResource' not found in [/var/mnt/www/xxxxx/app/api/app/Plugin/Stripe/Vendor/Stripe/lib/Stripe/PaymentIntent.php, line 56

BUT the ApiResource is included a lines before in Stripe.php... some idea how to fix that? thanks! :)

Examples

Thank you for an awesome plugin - exactly what I was looking for.

In your examples from "Creating A Cutomer" on-ward the example syntax uses:

$result = $this->StripeComponent->customerCreate($data);

Shouldn't it be:

$result = $this->Stripe->customerCreate($data);

Stripe API library is missing or could not be loaded.

I have placed the files as required in APP/Plugin/Stripe and PHP Stripe Library in APP/Plugin/Stripe/Vendor/Stripe/. The Stripe.php is in lib inside APP/Plugin/Stripe/Vendor/Stripe but I get the error
"Stripe API library is missing or could not be loaded."

Add log to record the transcations

Hi guys

Great job! I would like to see whether we can add a log or event listener to record the transactions, just like another plugin: Plugin/PaypalIpn/Controller/InstantPaymentNotificationsController.php

Listens for Saved Events in this function public function afterPaypalNotification($txnId)

Best Regards
Simon

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.