chronon / cakephp-stripecomponent-plugin Goto Github PK
View Code? Open in Web Editor NEWA CakePHP 2.x Stripe Payment Processing Component
License: MIT License
A CakePHP 2.x Stripe Payment Processing Component
License: MIT License
Please
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.
Not exactly sure as to why the plugin keep throwing this error at me. I have the latest stripe api loaded in the Vendors folder. Any help would be great.
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.
I just trying to do refund, find this in Stripe docs
$refund = \Stripe\Refund::create([
'charge' => 'ch_sG9ICouetJhw3NvixjWv',
'amount' => 1000,
]);
how to do it?
Hi,
I have used your component I do't know if the error is with the new library or what.
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.
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,
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.
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;
}
I see that Stripe supports coupons. Is there a way to accept coupons using this plugin?
Hello Sir
Can you please update the component for having the refund function also. Thanks
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.
Any possibility you can update the Stripe version to a 2.x version?
Per #8, the directory structure of the Stripe lib probably changed...
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! :)
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);
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."
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.