Closed angelleye closed 9 years ago
@angelleye thanks the the addition. I like idea, but the PayPal_Digital_Goods_Configuration::buttonsource()
should not have a default value, and it should only be added to the request if a value has been set.
i.e.
public static function buttonsource( $value = null ) {
return self::set_or_get( __FUNCTION__ , $value );
}
Then:
protected function get_api_credentials_url(){
$api_credentials_url = 'USER=' . urlencode( PayPal_Digital_Goods_Configuration::username() )
. '&PWD=' . urlencode( PayPal_Digital_Goods_Configuration::password() )
. '&SIGNATURE=' . urlencode( PayPal_Digital_Goods_Configuration::signature() )
. '&VERSION='. urlencode( PayPal_Digital_Goods_Configuration::version() );
$button_source = PayPal_Digital_Goods_Configuration::buttonsource();
if ( ! empty( $button_source ) ) {
$api_credentials_url .='&BUTTONSOURCE=' . urlencode( $button_source );
}
return $api_credentials_url;
}
I'm not really interested in working with PayPal in any partnership capacity for this library, so don't want a default with my name set on it.
It's really just a benefit for end users of the library, or the merchants that end up processing payments with it. For example, a transaction that gets processed with an official partner app is less likely to get caught in a fund holding situation. So then that could be a feature/benefit you could include with your other library features.
Just a thought.
a transaction that gets processed with an official partner app is less likely to get caught in a fund holding situation
Yep, but this isn't an official partner app, it's an independent library for developers to use in their apps (whether they're an official partner or not).
As I understand it, button source is also usually a benefit to the developer, because they can negotiate a commission of transactions that go through their app using their partner ID.
In my opinion, both of these provide enough justification to leave it empty unless a developer explicitly wants to set.
Adds PayPal partner code to API requests so that PayPal can associate the app with an official partner and can then begin referring merchants and developers to use this product.