Jump to content

Payment base class + PaymentStripe + PaymentPaypal


apeisa

Recommended Posts

  • 7 months later...
10 hours ago, godmok said:

Hi apeisa, will there be a compatibility for PW 3.0? Or is there a way to force it to run?

For what it's worth, I'm running it with 2.8.x no problem. Aren't 3.0 and 2.8.x essentially the same apart from the namespaces stuff? Does namespaces affect the module?

  • Like 1
Link to comment
Share on other sites

Hi, sorry for late feedback.

You are both right. It is running now and set to the sandbox.

I still got this error on PaymentModule when I look into the module settings: "Method PaymentGatewayPayPal::getTitle does not exist or is not callable in this context". It seems to be alright on the frontend.

On the frontend i get an error where I finish the transaction and get to the success site, but there i get this:

Quote

Error: Exception: Couldn't get access into (in D:\WT-NMP\WWW\tp\site\assets\cache\FileCompiler\site\modules\PaymentPaypal\PaymentPaypal.module line 68)

#0 D:\WT-NMP\WWW\tp\site\templates\views\register_form_view.php(45): PaymentPaypal->processPayment()
...

I get from PayPal an post input with a lot of data from the payment process, but after the payment forwarded to the process/success page it always gives me this error.

Link to comment
Share on other sites

  • 5 weeks later...

I've been trying to get this to work on a fresh install of PW 3.0.36 and the PW3 versions of Payment base + PaymentStripe

When trying your example scritp, it throws an error on line 28 of the paymentStripe.module 

Stripe::setApiKey($this->secretKey);

Error: Class 'Stripe' not found (line 28 of /...blah..../modules/PaymentStripe/PaymentStripe.module) 

I tried the older versions of the modules but hit the same problem. 

Kind regards

 

Link to comment
Share on other sites

Yes I did Apeisa. And then tried with the master branch and got the same trouble (after replacing the Stripe Lib files). 

I've just tried again with the latest PW3 and PaymentModule-PW3 and PaymentStripe-PW3.  I've selected Stripe as the active payment module in the base module and also tried selecting both Stripe and Payment module. This was using Wamp and PHP 5.4.4. I tried on a live server with PHP 5.6 and got the same result. By the way - I am using the '?step=process' in the URL.

Error: Class 'ProcessWire\Stripe' not found (line 28 of /..blah../site/modules/PaymentStripe-PW3/PaymentStripe.module) 

Kind Regards

Nik

Link to comment
Share on other sites

  • 1 month later...

Hi @apeisa

Looking at using the payments module with Stripe, and have both PaymentsModule and PaymentsStripe installed with config. Seem to be getting a error using your example code, no such embed? Method PaymentStripe::embed does not exist or is not callable in this context

using the code here but adding a product unit (as it was erroring without): http://modules.processwire.com/modules/payment-stripe/

Link to comment
Share on other sites

  • 3 weeks later...
  • 8 months later...

PaypalPayments - having problem on Process step not validating. There was an error, which went away after chaning the settings to use Curl, but now it always returns "Payment canceled or something went wrong" after sucessful retunr from paypal.

I orginally had different pages for each checkout item, but now doing the whole checkout process on one url.

@apeisa Happen to know what might be happening here at all?

Thanks!

Link to comment
Share on other sites

OK soooooooo, may have fixed it. Doing everything over Ajax and somehow it was working originally using the basic implemtation in the docs. However I finally got to the bottom of it and it wasn't keeping take of the price after returning from Stripe to finalise.

So I added a flip flop variable for the price so if it's not there it grabs it from the session.

$amount = $itemPage->price;

// save price for later
if($amount == 0){
	$amount = $session->get('price');
}else{
	$session->set('price',$amount);
}
$payment->addProduct($title, $amount, 1);

 

Link to comment
Share on other sites

  • 3 weeks later...

With regards to paymentstripe specifically...

Does anybody know if this still works?

If it does can anybody provide help more than the example provided? Like how would I tie this into a payment form? Is that even what this does?

I am in the process of trying (and failing miserably) to set this up with stripe elements in a cusom form. I am using the processwire form API to create the form but it is not submitting...sometimes without errors and sometimes with errors.

If someone could just give an example of how to use this with a form that would be incredibly helpful.

Link to comment
Share on other sites

Hi @cleanboy

I think i'm right in saying that the payment modules are wrappers for the Stripe and Paypal libraries, therefore you can access the Stripe methods in Processwire.

That said, I think you were asking how to use it, the example shows how you can pass amounts and basic customer information to Stripe, if a successful request is made Stripe pass you back a payment button which enables the customer to click and add their card details. The module does not store any information on the purchase, what was purchased, who by or anything infact, its just a way of interacting with Stripe or Paypal.

If you need to track payments or are selling physical items you will need someway of keeping track of transactions and items like a store e.g. padloper or create your own tracking (which I've done several times mainly because I've been selling digital goods like subscriptions so have little need for item tracking or postage variables).

Hope that helps.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hey guys.

I am so lost when it comes to PayPal and online payments. I need to be able to take payments through a pw website but the conditions are unusual so there doesn't seem to be an out of the box solution from PayPal. I'm working for a woman that sells orthotics to patients face to face, gives them a hardcopy invoice but wants them to have the option of paying the bill through her website. All I need is a form with 2 fields: Invoice # and Amount Paid that will pass those values onto PayPal for all the transaction processing goodness. I don't even know if the PaymentPaypal module will do this. The PayPal API is badly written (to me) and I can't make sense of it.

Can anyone offer any guidance on the module and how it can be set up to do this?

Help.

Link to comment
Share on other sites

6 hours ago, bernhard said:

if you don't need the invoice number you could use a paypal.me link like i have in my signature. another option could be to use paypal buttons: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/buy_now_step_1/

Hey Bernhard,

PayPal.me is in most respects a great service. The only draw back is you have to have a paypal account to use it. We have it set up but don't really want to force people to get an account just to send money. We also have interac e-transfer as an option but that's not for everyone either so PayPal is still important.

I looked at the paypal buttons as well. The only problem with them is you have to set a fixed price when you set it up. Each customer will have a different amount owed so it won't work. They have donation buttons that allow users to enter a custom amount but there's no flexibility with the set up. You'd think Paypal wouldn't be so rigid in their payment solutions, forcing people to work the way Paypal expects rather than bending to meet customer's needs. I told them as much in a support ticket which is maybe why I haven't heard back from them. :-[

  • Like 1
Link to comment
Share on other sites

53 minutes ago, digitex said:

The only draw back is you have to have a paypal account to use it

sorry, didn't know that

53 minutes ago, digitex said:

The only problem with them is you have to set a fixed price when you set it up

you can't set that up dynamically?? crazy.

ok sorry, then i was of no help :) 

  • Like 1
Link to comment
Share on other sites

3 minutes ago, bernhard said:

you can't set that up dynamically?? crazy.

That's the thing. I'll bet you can just not using the tools PayPal provides. Their API is not well documented (it's written in such a way I get lost). PaymentPayPal might let me do what I need but I'm way out of my element with this stuff. I've never worked with PayPal before.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...